0.0.11 • Published 6 years ago

test-pag v0.0.11

Weekly downloads
16
License
-
Repository
-
Last release
6 years ago

CosNgPagination

Pagination component for angular.

Install

The module can be installed using npm:

npm i cos-ng-pagination

Usage

Import CosNgPaginationModule from pagination-lib:

import { CosNgPaginationModule } from 'pagination-lib'

Add PaginationModule to the imports of your NgModule:

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    CosNgPaginationModule
  ],
  exports: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

use in your templates to add pagination in your view like below

<cos-ng-pagination [total]="total" [currentPage]="currentPage" [perPage]="perPage" (pageChangedEvent)="onPageChange($event)"></cos-ng-pagination>

Options

total

Number The total number of items in the database.

perPage

Number The number of items to display per page.

currentPage

Number Current page (active) page number.

directionLinks

boolean If set to false, the "previous" and "next" links will not be displayed. Default is true.

pageChangedEvent

event handler The expression specified will be invoked whenever the page changes via a click on one of the pagination controls. The $event argument will be the number of the new page. This should be used to update the value of the currentPage variable which was passed to the PaginatePipe.

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago