Reputation: 359
I have implemented pagination using dirPagaination. There is a click action which actually hides an icon in a row. When I came back to the current page after visiting the 2nd and 3rd page, the hidden icon is showing.
Upvotes: 0
Views: 480
Reputation: 4274
use <pagination>
tag. it is very easy to add paggination functionality in angular js.
totalItems = total records
currentPage = current page (initially it is 1)
maxSize = maximum pagination button
itemsPerPage = perpage numbers of record to show
Set below in your controller, where you are getting list of data
$scope.totalItems = $scope.empList.length;
$scope.currentPage = 1;
$scope.itemsPerPage = 10;
$scope.maxSize = 5;
Below put in your HTML
<pagination total-items="totalItems" ng-model="currentPage" max-size="maxSize" class="pagination-sm" boundary-links="true" items-per-page="itemsPerPage"></pagination>
Upvotes: 0