Server side pagination using NG Prime data table in Angular
Most of the project in web technology stack uses client side pagination. In most of the Angular, React portal application uses client side pagination, filter and sorting. Meaning one call and get all the data on the client side and then play around with the data. However there are many scenarios where data are in millions and beyond. In these scenarios getting a local copy of data is very expensive. Current clouds giants i.e. AWS, Azure charges data based on the number of hits, records and data volumes. So creating local copy is expensive in terms of server side implementations.
From Graphical user interface(GUI) prospective it is very difficult to manage large data with millions of rows. It may hang browser or consume much resource. This will lead to slowness and less responsive user interface.
NG prime provides very good user interface. It provide both client side responsive data table as well as server side responsive data tables. Scope of this article is to implement server side data. Well client side data table is pretty straight forward.
- Install dependencies:
npm i primeng
Check the package.json file for prime ng components are installed properly or not.
- Now construct the interface in product.ts file. Product…