Created
November 6, 2015 05:27
-
-
Save geraldhumphries/e0ed743dc4162ac02f3d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.predicate = 'id'; | |
$scope.reverse = true; | |
$scope.loadAll = function() { | |
Client.query({page: $scope.page, size: 20, sort: $scope.predicate + ',' + ($scope.reverse ? 'asc' : 'desc')}, function(result, headers) { | |
$scope.links = ParseLinks.parse(headers('link')); | |
$scope.clients = result; | |
}); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<th ng-click="predicate = 'name'; reverse=!reverse; loadAll()"> | |
<span translate="app.client.name">Name</span> | |
</th> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment