JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app ng-controller="ContactListCtrl">
<h1>AngularJS Sorting Example</h1>
<select ng-model="sortorder">
<option value="surname">Surname (A-Z)</option>
<option value="-surname">Surname (Z-A)</option>
</select>
<table class="contacts">
<tr>
<th>Name</th>
<th>Telephone</th>
</tr>
<tr ng-repeat="contact in contacts | orderBy:sortorder">
<td ng-class-even="'even'">{{contact.name}}, {{contact.surname}}</td>
<td ng-class-even="'even'">{{contact.telephone}}</td>
</tr>
</table>
</div>
CSS
body { font:12px arial, sans-serif; line-height:1.6em; margin:0 auto; max-width:960px; }
h1, select, table { margin-bottom:20px; }
table { width:80%; }
th, td { padding:5px; text-align:left; vertical-align:top; }
th { background:#ccc; }
.even { background-color:#efefef; }
JavaScript
function ContactListCtrl($scope){
$scope.sortorder = 'surname';
$scope.contacts =
[
{ "name":"Richard", "surname":"Stallman", "telephone":"1234 98765" },
{ "name":"Linus", "surname":"Torvalds", "telephone":"2345 87654" },
{ "name":"Donald", "surname":"Knuth", "telephone":"3456 76543" }
];
};