You can use the following code as per your need..
HTML
<table>
<tr ng-repeat="x in dummyData track by $index" ng-hide="$index >= loadIndex">
<td>{{x.id}}</td>
<td>{{x.name}}</td>
<td>{{x.status}}</td>
</tr>
</table>
<button type="button" ng-click="showMore()" ng-if="loadIndex < dummyData .length">Show More</button>
<button type="button" ng-click="showLess()" ng-if="loadIndex >= dummyData .length">Show Less</button>
Controller
$scope.loadIndex = 6 // increment the loadindex as per yourr need
$scope.showMore = function() {
// don't increment if at the end of the list
if ($scope.loadIndex < $scope.dummyData .length) {
$scope.loadIndex += 5;
}
};
$scope.showLess = function() {
if ($scope.loadIndex >= $scope.dummyData .length) {
$scope.loadIndex -= 5;
}
};
$scope.dummyData = [{
"id":1,
"name":"abc1",
"status":"open"
},{
"id":2,
"name":"abc2",
"status":"open"
},{
"id":3,
"name":"abc3",
"status":"open"
},{
"id":4,
"name":"abc4",
"status":"open"
},{
"id":5,
"name":"abc5",
"status":"open"
},{
"id":6,
"name":"abc6",
"status":"open"
},{
"id":7,
"name":"abc7",
"status":"open"
},{
"id":8,
"name":"abc8",
"status":"open"
},{
"id":9,
"name":"abc9",
"status":"open"
},{
"id":10,
"name":"abc10",
"status":"open"
}]