Here is what seems to be bothering a lot of people (including me).
When using the ng-options directive in AngularJS to fill in the options for a &
For an object:
<select ng-model="mySelect" ng-options="key as value for (key, value) in object"></select>
The tutorial ANGULAR.JS: NG-SELECT AND NG-OPTIONS helped me solve the problem:
<select id="countryId"
class="form-control"
data-ng-model="entity.countryId"
ng-options="value.dataValue as value.dataText group by value.group for value in countries"></select>
The ng-options directive does not set the value attribute on the <options> elements for arrays:
Using limit.value as limit.text for limit in limits means:
set the
<option>'s label aslimit.text
save thelimit.valuevalue into the select'sng-model
See Stack Overflow question AngularJS ng-options not rendering values.