pagination

This commit is contained in:
annampak 2017-10-09 16:37:39 +03:00
parent 7f4cf41c2e
commit 222d60c88f
1 changed files with 2 additions and 2 deletions

View File

@ -26,12 +26,12 @@ export class PaginationService {
let startIndex = (currentPage - 1) * pageSize;
let endIndex = Math.min(startIndex + pageSize - 1, totalGroups - 1);
// create an array of pages to ng-repeat in the pager control
// create an array of pages to ng-repeat in the pagination control
let pages = [];
for (var i = 1; i <endPage + 1; i++)
pages.push(i);
// return object with all pager properties required by the view
// return object with all pagination properties required by the view
return {
totalGroups: totalGroups,
currentPage: currentPage,