'Pagination in angular

I'm using ngx-pagination

https://www.npmjs.com/package/ngx-pagination

app.module:

import { NgxPaginationModule } from 'ngx-pagination';

@NgModule({
  declarations: [
    AppComponent,
   ...
  ],
  imports: [  
    ...
    NgxPaginationModule,
   
  ],

.ts file

  p: Number = 1;
  count: Number = 2;

Component:

 <li *ngFor="let data of this.lists; let i = index  | paginate: { itemsPerPage: count, currentPage: p }"><a href="javascript:void(0)"> # {{ i+1 }} Test</a></li>

Getting this error :

error NG5002: Parser Error: Unexpected token | at column 50 in [let data of this.lists; let i = index | paginate: { itemsPerPage: count, currentPage: p }] in ....component.html@67:32

Any solution to resolve this issue. Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source