1.1.3 • Published 5 years ago

pagination-ng-lib v1.1.3

Weekly downloads
26
License
-
Repository
-
Last release
5 years ago

Pagination Library

Pagination for Angular 2+

Instalation

npm install pagination-ng-lib --save

Usage

Code for compontent.html

<pgl-pagination
  [currentPage]="currentPage"
  [totalPages]="totalPages"
  [maxPerPage]="maxPerPage"
  (pageSelected)="pageSelected($event)">
</pgl-pagination>

Code for component.ts

  currentPage = 1;
  totalPages = 10;
  maxPerPage = 5; // Best to use odd numbers

  // Use this function to call API and fetch resourses
  // passing the page number "currentPage"
  pageSelected(currentPage) {
    console.log(currentPage);
  }
1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago