Relative Content

Tag Archive for angulartypescriptangular-materialangular-material-tablemat-pagination

How to Keep mat table paginator at selected page after refresh?

I am using mat table to show data and my API gives page-wise data.
Now first time it renders and then user changes the page and refreshes the page after, then I want to show 2nd page and not first one.
To do that I have saved the pageIndex to local storage and retrieve when page refreshes and my API also calls page 2nd but the pagination options are wrong as:
Mat Page Options After refesh

Angular – How to Keep mat table paginator at selected page after refresh?

I am using mat table in to show data and my api gives page wise data.
Now first time it renders and then user changes the page and refreshes the page after, even then I want to show 2nd page and not first one.
To do show I have save the pageIndex to local Storage and retrieve when page refreshes and my api also calls page 2nd but the pagination options are worng as:
Mat Page Options After refesh