I'm working with a TableComponent that uses an Angular Material table to display links to other components.
https://i.sstatic.net/M2R7P.png
Here's the issue - when I navigate to the second page of the table (as shown in the image above) and click on a link, it redirects me to the DetailComponent. However, when I try to go back using the back button or by executing location.back()
, I end up back at the TableComponent, but it resets to the first page instead of maintaining the previous state.
https://i.sstatic.net/KLQEa.png
Is there a way to ensure that the table retains the state it was in before redirections between components?
Any help would be greatly appreciated. Thank you!