0

I am working with Angular 5, In one of my webpage i am hitting DB to fetch records. but from this service call i am getting more than 1,00,000 of records. while showing it on the webpage taking a lot of time and leads to the bad user experience.

I want to show 10 records in the web page after the remaining records will merge with existing records.

Please help me how to do it. is any RxJs operator available.

Santhosh
  • 1,053
  • 1
  • 20
  • 45

1 Answers1

0

You can use primeng p table with paginator or if you are using bootstrap then you can use bootstrap pagination

https://www.primefaces.org/primeng/#/table/page

If you want it custom and your own paginator then write below logic for your table

<tr *ngFor="let game of games | paginate: { itemsPerPage: 5, currentPage: p }; let i = index">

Refer How to add pagination in Angular 4 for a table?

Jayant Patil
  • 1,537
  • 2
  • 11
  • 18