Reputation: 4931
Can some one spot error with this pagination. Date in the table is not updating with change of page links
<uib-pagination
ng-model="currentPage"
total-items="rows.length"
max-size="maxSize"
boundary-links="true">
</uib-pagination>
http://plnkr.co/edit/1XPI7zwSrooBeAcBNddU?p=preview
Upvotes: 1
Views: 5713
Reputation: 1789
I think you could simplify your code a little ... This should work:
HTML (just the diff):
<tr ng-repeat="reservation in rows | limitTo:numPerPage:(currentPage - 1) * numPerPage">
JS:
$scope.rows=[ ... ];
$scope.currentPage = 1;
$scope.numPerPage = 3;
$scope.maxSize = 5;
$scope.startAt = 0;
Upvotes: 5