Skip to content

AramPqo/Angular-Pagination

Repository files navigation

Paginator for Angular

ngpq-pagination

Installation

npm install ngpq-pagination

Example

Template

<ngpq-pagination 
  [pageSize]="8" 
  [maxSize]="6"
  [(page)]="pageNumber" 
  [totalElements]="data.length"
  [arrows]="arrows"
  [directionLinks]="true"
  (pageChange)="pageChange($event)">
</ngpq-pagination>

Component

export class AppComponent {
    pageNumber = 1;
    arrows = new PaginationArrow('prev', 'next', 'first', 'last');
}

Module

import { NgModule } from '@angular/core';
import { AppComponent } from './app.component.ts';
import { NgPqPaginationModule } from 'ngpq-pagination';

export class AppModule {
    declarations: [
    AppComponent
   ],
   imports: [
    NgPqPaginationModule
   ]
}

alt text

Inputs

[(page)]: number;
[pageSize]: number; 
[maxSize]: number;
[totalElements]: number;
[directionLinks]: boolen;

Ouputs

(pageChange): EventEmitter<number>;

About

Pagination for Angular

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published