Angular has an orderBy filter that can be used like this:
<select ng-model="selected" ng-options="f.name for f in friends | orderBy:'name'"></select>
See this fiddle for an example.
It's worth noting that if track by
is being used it needs to appear after the orderBy
filter, like this:
<select ng-model="selected" ng-options="f.name for f in friends | orderBy:'name' track by f.id"></select>