1.0.3 • Published 5 years ago
pagination-ng v1.0.3
Pagination Library
Pagination for Angular 2+
Instalation
npm install pagination-ng --save
Usage
Code for compontent.html
<pgl-pagination
[currentPage]="currentPage"
[totalPages]="totalPages"
(pageSelected)="pageSelected($event)">
</pgl-pagination>
Code for component.ts
currentPage = 1;
totalPages = 5;
// Use this function to call API and fetch resourses
// passing the page number "currentPage"
pageSelected(currentPage) {
console.log(currentPage);
}