JSFiddle - React, Tailwind, and code Playground
by Son Che Dinh
HTML
<body ng-app="orderByFilter">
<div ng-controller="ExampleController">
<table class="employees">
<tr>
<th>Name</th>
<th>Phone Number</th>
<th>Age</th>
</tr>
<tr ng-repeat="employee in employees | orderBy:'age'">
<td>{{employee.name}}</td>
<td>{{employee.phone}}</td>
<td>{{employee.age}}</td>
</tr>
</table>
</div>
</body>
JavaScript
angular.module('orderByFilter', [])
.controller('ExampleController', ['$scope', function($scope) {
$scope.employees = [
{name: 'Tam', phone: '123456', age: 15},
{name: 'Quan', phone: '987612', age: 20},
{name: 'Linh', phone: '321223', age: 21},
{name: 'Huan', phone: '555878', age: 35},
{name: 'Khanh', phone: '551235', age: 29}
];
}]);