ngpq-pagination
npm install ngpq-pagination
<ngpq-pagination
[pageSize]="8"
[maxSize]="6"
[(page)]="pageNumber"
[totalElements]="data.length"
[arrows]="arrows"
[directionLinks]="true"
(pageChange)="pageChange($event)">
</ngpq-pagination>
export class AppComponent {
pageNumber = 1;
arrows = new PaginationArrow('prev', 'next', 'first', 'last');
}
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component.ts';
import { NgPqPaginationModule } from 'ngpq-pagination';
export class AppModule {
declarations: [
AppComponent
],
imports: [
NgPqPaginationModule
]
}
[(page)]: number;
[pageSize]: number;
[maxSize]: number;
[totalElements]: number;
[directionLinks]: boolen;
(pageChange): EventEmitter<number>;