0.0.4 • Published 5 years ago
wassa-pagination v0.0.4
Wassa-Pagination
This library was generated with Angular CLI version 8.2.13.
Getting started
Step 1: Install
Run npm install wassa-pagination
Step 2: Import the module
import {PaginationModule} from 'wassa-pagination';
@NgModule({
declarations: [...],
imports: [
...
PaginationModule
],
})
export class AppModule {}
Step 3: Use it
Inside the template :
<wassa-pagination
(actionPage)="onChangePage($event)"
[currentPage]="currentPage"
[totalPages]="totalPages"
></wassa-pagination>
Inside the component :
// the current page number
public currentPage: number;
// The total of pages
public totalPages: number;
public onChangePage(page: number) {
// do whatever you want with the page number
}