I have a select element defined as such:
When you assign a value to some select element, AngularJS looks for the provided value in the value attribute of the option tags in that select element. But the catch is, AngularJS does a type based comparison. So if the values in the option tags are strings (which usually is the case) and the variable you bind using ng-model is a number, AngularJS fails to find the matching option element and hence, creates its own element like this -
The solution is, while binding itself, convert it to the appropriate type.
In this case, the solution would be to bind an Integer
If the values are set as Strings, the trick would be to use