0.0.17 • Published 1 year ago
@agentsmith.bgd/pagination-lib v0.0.17
PaginationLib
Pagination component
Attributes
Attribute | Type | Description |
---|---|---|
first=false | boolean | Flag if we are on first page |
last=false | boolean | Flag if we are on last page |
align='' | "" or "justify-content-center" or "justify-content-end" | Aligment of component left(default), center or right |
totalPages=0 | number | Total number of pages |
page=0 | number | Current page (active page) |
enableLog=false | boolean | Enable console logger (developer logs) |
Events
Event | Description |
---|---|
pageChange(page):EventEmitter<number> | Dispatch when we click on pagination buttons and emits target page |
Installation
Install pagination-lib
from npm
npm i @agentsmith.bgd/pagination-lib
Add package to NgModule imports:
import { PaginationLibModule } from '@agentsmith.bgd/pagination-lib';
@NgModule({
...
imports: [PaginationLibModule, ...],
...
})
Add component to your page
<as-pagination
(pageChange)="$event"
[first]="true"
[last]="false"
[page]="0"
[totalPages]="20"
align="justify-content-center"
></as-pagination>
Compatibility
There is only one dependency: Angular > 12.x.x