Réponse

ng-repeat=x in names | orderBy: 'country'

Colonne
Explication

Adding Filters to Directives
Filters are added to directives, like ng-repeat, by using the pipe character |, followed by a filter:

Example
The orderBy filter sorts an array:

<div ng-app="myApp" ng-controller="namesCtrl">

<ul>
<li ng-repeat="x in names | orderBy:'country'">
{{ x.name + ', ' + x.country }}
</li>
</ul>

</div>

Question

Adding Filter (orderBy 'country') to Directive ng-repeat (applied to the array 'names')

Thématique