lch
lch

Reputation: 4931

Angular ui pagination not working

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

Answers (1)

o4ohel
o4ohel

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

Related Questions