pagination
This commit is contained in:
parent
7f4cf41c2e
commit
222d60c88f
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue