AngularJs select item not setting correct text on first select

Friday, July 4, 2014

I Have a select box set as so:



<select id="Supplier" class="form-control" ng-model="vm.SelectedSupplier" ng-options="S.Name for S in vm.Suppliers"></select>


When the page loads up the selection in the select box is blank. So far so good. But, when I select one of the options, regardless of its index, the text value in the select box gets set to the 1st option, but, the model bound by ng-model is set to the correct value.


This only happens on the first select attempt though, subsequent select attempts have the text in the select box match the suppliers name at the selected index.


I hope that makes sense, any ideas?


Thanks,







http://ift.tt/1jQ75La