I have an array of Objects, eg:
[Object { id="121", name="Planes"}, Object { id="212", name="Buses"}, Object { id="210", name="Cars"}, .... ]
I want this to appear in a select such as:
<select....>
<option value="121"...>Planes</option>
<option value="212"...>Buses</option>
<option value="210"...>Cars</option>
</select>
But if I use the following code:
<select.... ng-options="category.id as category.name for category in categories" .....
I get the following (the values are wrong):
<select....>
<option value="1"...>Planes</option>
<option value="2"...>Buses</option>
<option value="3"...>Cars</option>
</select>
How can I solve this?
Thanks