I've searched online and tried a few solutions which rely on orderBy but unfortunately it has not been successful. I have a drop down box and would like the values to be in alphabetical order as I have the same name and would therefore like them to be above/below each other. My code is the following and wit hit it shows the orderBy method:
<div class="col-lg-6 col-sm-6 col-xs-6">
<!--reach-infinity="refreshUsers($select.search)"-->
<ui-select ng-model="user.selected"
ng-keyup="refreshUsers($select.search)"
on-select="onUserLoginChange($select.selected)"
ng-show="true"
theme="bootstrap" style="min-width: 300px;">
<ui-select-match class="ui-select-match"
placeholder="Enter user login">{{$select.selected.loginName}}</ui-select-match>
<ui-select-choices class="ui-select-choices"
repeat="user in usersList track by $index | orderBy:'loginName'">
<div ng-bind-html="user.loginName | highlight: $select.search"></div>
<small>
clientName: {{user.clientName}}
</small>
<div ng-if="$index == $select.items.length-1">
<button
ng-if="!useNgMouseover"
class="btn btn-xs btn-blue"
style="width: 100%; margin-top: 5px;"
ng-click="loadMoreUsers($select, $event);"
ng-show="moreUsers"
ng-disabled="isLoading">Load more...
</button>
</div>
</ui-select-choices>
</ui-select>
<span ng-show="userDetailsForm.$dirty && !userLoginFound" class="glyphicon glyphicon-remove form-control-feedback"></span>
</div>