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 &
I had this issue too. I wasn't able to set my value in ng-options. Every option that was generated was set with 0, 1, ..., n.
To make it right, I did something like this in my ng-options:
I use "track by" to set all my values with room.price.
(This example sucks: because if there were more than one price equal, the code would fail. So BE SURE to have different values.)
$scope.Rooms = [
{ name: 'SALA01', price: 100 },
{ name: 'SALA02', price: 200 },
{ name: 'SALA03', price: 300 }
];
I learned it from blog post How to set the initial selected value of a select element using Angular.JS ng-options & track by.
Watch the video. It's a nice class :)