Is there a way to sort the choices in a {select}
like this?
<select ng-options="value as name for (value,name) in vm.options" ng-model="vm.selected">
If the object vm.options
is being used and sorting by values is desired, how can it be achieved?
Situation: To include an empty option "" as a valid value, the challenge arises of making it the first choice in the list. Unfortunately, working with objects in Javascript may pose some obstacles in achieving this goal.