Reputation: 105
Have problem with binding model to input and select in the same time. Input value changes when model selected from dropdown. But dropdown doesn't change if entered input value equal some of the values of list.
<select
ng-model="Choice.SelectedOption"
ng-options="choice.ID as choice.Name for choice in Choice.Options">
</select>
{{Choice.SelectedOption.ID}}
input model <input type="text" ng-model="Choice.SelectedOption">
input value {{ Choice.SelectedOption }}
Change model from dropdown, then try to change model from input to 1,2 or 3 (it's users ID's)
Upvotes: 0
Views: 266
Reputation: 732
Changing <input type="text">
to <input type="number">
fixed it.
http://plnkr.co/edit/FQqVGZz51SCJunWPZwfd?p=preview
Upvotes: 1