angular-bootstrap-select icon indicating copy to clipboard operation
angular-bootstrap-select copied to clipboard

ng-options support in angular 1.4

Open jamesjwarren opened this issue 10 years ago • 0 comments

When using ng-options with selectpicker in angular 1.4 - changing the model value does not correctly update the selectpicker. I think this may be related to this update of ng-options: https://docs.angularjs.org/guide/migration#ngoptions

Specifically it could be caused by the fact ng-options option values are now prefixed with type like number:1 string:foobar.

<select selectpicker
    ng-model="dobMonth"
    name="dobMonth"
    ng-options="month.id as month.name for month in months">
  <option value>Month</option>
</select>

Using track by seems to work around the issue: ng-options="month.id as month.name for month in months track by month.id"

jamesjwarren avatar Dec 16 '15 11:12 jamesjwarren