UNPKG

nggridify2

Version:

ng-gridify reimagined for Angular2+. Generic grid for angularJS with paging, sorting, the ability to export CSV and configurable content.

16 lines (12 loc) 440 B
import { Pipe, PipeTransform } from '@angular/core'; import { NgGridifyService } from './../services/ng-gridify.service'; @Pipe({ name: 'PagePipe', pure: false }) export class PagePipe implements PipeTransform { constructor(private ngGridifyService: NgGridifyService) { } transform(dataIn: any[], itemsPerPage:number, currentPage:number): any { return this.ngGridifyService.PageData(dataIn, itemsPerPage, currentPage); } }