Home > database >  How to handle large no of data/records from backend and display in UI as Angular
How to handle large no of data/records from backend and display in UI as Angular

Time:05-09

There could be following possibilities, need help against each one.

  1. Pagination can be implemented, but if we apply pagination, then can we search data from all the records or only the selected page record. If we can search only on the selected page record then how can we search from the entire data.

  2. If we do not apply pagination, then virtual scrolling can be done but again the same question, once we came to the end of the scroll API will hit back to call the next set data, then how do we search from the entire data.

Need help to know whats the best possible solution to handle large amount of data with good performance and thinking about the basic functions that should be there to cater this kind of request.

Any help would be much appreciated.

CodePudding user response:

You can use server-side pagination and sorting and also use the filtering feature on the server side too.

CodePudding user response:

Considering the data to be an array, create two variable one with the entire data and other with 10-20 of the entire data. Use the second variable to render the data and to perform search use the first variable to search the entire record. When next or more button is clicked push the next 10-20 data or replace the already existing data so the page is re-rendered with new data.

  • Related