From 6661520ff8ba6a817c109db5b8694d4920b8eed7 Mon Sep 17 00:00:00 2001 From: Paul Preibisch Date: Sat, 25 Jun 2016 11:53:55 +0700 Subject: [PATCH] There is a problem with your last page... if the last page is sent to the server, there are no results listed.. this lists the second last page, so that results can be displayed. Please let me know if you disagree. PS I am using server side pagination --- src/directives/pagination/dirPagination.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/directives/pagination/dirPagination.js b/src/directives/pagination/dirPagination.js index a1a7265..b2ed45f 100644 --- a/src/directives/pagination/dirPagination.js +++ b/src/directives/pagination/dirPagination.js @@ -410,7 +410,7 @@ */ function generatePagesArray(currentPage, collectionLength, rowsPerPage, paginationRange) { var pages = []; - var totalPages = Math.ceil(collectionLength / rowsPerPage); + var totalPages = Math.ceil(parseInt(collectionLength - 1)/ rowsPerPage); var halfWay = Math.ceil(paginationRange / 2); var position;