Can't get orderBy
to work when I have a complex ng-options
statement.
This does not sort the <select>
options as expected:
ng-options="p.proxyType for p in proxyOptions track by p.proxyType | orderBy:'proxyType'"
http://plnkr.co/edit/60ZbBP1mg5VvlMwrvOZS?p=preview
The syntax is wrong, it should be...
<select ng-model="data.selected"
ng-options="p.proxyType for p in proxyOptions | orderBy:'proxyType' track by p.proxyType"></select>
In other words, track by
part should be the last one. Plunkr.