JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<div ng-app="app" ng-controller="MyController">
<thead>
<th ng-click="changeFilter=!changeFilter">Name</th>
<th ng-click="changeFilter=!changeFilter">Date</th>
</thead>
<tbody>
<tr ng-repeat="item in array | orderBy: !changeFilter ? '-date' : 'name'">
<td> {{item.name}} </td>
<td> {{item.date}} </td>
</tr>
</tbody>
</div>
</table>
JavaScript
function MyController($scope) {
$scope.array = [{
name: 'item1',
date: 1453284120
}, {
name: 'item2',
date: 1453284440
}, {
name: 'item3',
date: 1453284550
}, {
name: 'item4',
date: 1453284086
}, {
name: 'item5',
date: 1453284330
}, ]
};
var app = angular.module("app", []);
app.controller("MyController", MyController);