Angular Data table pagination

  • step1:
npm install ngx-pagination
  • step2: Import the ngx-pagination in the app.module.ts file.
import { NgxPaginationModule} from 'ngx-pagination';
 imports: [
    ...
    NgxPaginationModule
  ],
  • step3: In the component where you load your table, use the ngx-pagination as a pipe.

...
{{i}} {{person.firstname}} {{person.lastname}} {{person.gender}} {{person.phone}} {{person.email}} Delete | Edit

And that's it!

你可能感兴趣的:(Angular Data table pagination)