I need a select with this
{ id: 111, shortName: 'RJ' },
{ id: 112, shortName: 'MG' },
{ id: 113, shortName: 'DF' }
I need to show the 'shortName' field on the selector, but the needs to be with the id value. This is what I have:
<select ng-model="model.StateId" ng-options="c.shortName for c in model.states"></select>
It shows the shortName correctly, but the option values are 0, 1, 2. How can I modify them with the id value on the array?