2.0.1 • Published 6 years ago
angular-jee-pagination v2.0.1
AngularJeePagination
Installation
npm install
npm install angular-jee-pagination --save
Once installed, you can import jeePagination component into your application in app.module.ts
import { JeePaginationModule } from 'angular-jee-pagination';
Then include it in @NgModule imports array…
Now you can use jeePagination component with basic 3 parameters
<app-jee-pagination
[totalRecords]="pages"
[perPage]="perPage"
(controller)="paginationController($event)">
</app-jee-pagination>
Configuration
A complete list of JeePagination parameters can be found in the table below.
Name | Type | Input/Output | Parameter description |
---|---|---|---|
totalRecords | Number | @Input | (required) The total number of items. |
perPage | Number | @Input | (required) How many items per page (required). |
showBefore | Number | @Input | (optional) How many page can i see before current page (2 By default). |
showAfter | Number | @Input | (optional) How many page can i see after current page (3 By default). |
goToBox | Boolean | @Input | (optional) Show or hide input box (true By default). |
highlightColor | String | @Input | (optional) The color of highlight. |
controller | Function($event) | @Output | (required) This function will call when the page change.it takes a 'pageNumber' as a parameter |
Development
Download and install NodeJS so you can use NPM: https://nodejs.org/download/
From the Terminal, navigate to the project directory and run in the following order:
npm install
ng serve
Use packagr to bulidnpm run packagr
npm pack