1
控制器:填充選擇
$scope.obj = {
"category": {
"value": "1",
"synonym": ""
},
"name": {
"value": "2",
"synonym": ""
}
};
我有HTML這樣的:
<select
ng-model="model",
ng-options="value.value as key for (key , value) in obj",
bs-select>
</select>
我想要得到這樣的結果:
<option value="1"> category </option>
<option value="2"> name </option>
,但我得到這樣的:
<option value="category"> category </option>
<option value="name"> name </option>
你能幫我找到問題嗎?
哇感謝您的好回答:) – karaxuna