0

I think this has a simple answer I can't seem to find anywhere. I have a table of items I retrieve from an API results. When an item is clicked, I use:

this.router.navigate(['/teaching/' + obj.id], {state: {data: obj}});

to display the details of the teaching on a new page. When I use the browser to go back to view my list, it reloads and clears the table.

How do I just keep the same state of the previous page?

coder
  • 10,460
  • 17
  • 72
  • 125
  • Does [RouterState](https://angular.io/api/router/RouterState) point in the right direction? – Phix Jun 01 '20 at 20:38
  • is this answer your question https://stackoverflow.com/questions/45290062/how-can-we-save-state-of-component-in-angular-2 – Avinash Dalvi Jun 01 '20 at 20:39

0 Answers0