I am trying to create multiple view in my angular application by using routing, once navigate to another view on click of browser back button not able to get previous view data (page is getting refreshed completely)
Asked
Active
Viewed 477 times
0
-
Either use a singleton service to persist data or you can go for Local Storage – Vikas Sep 29 '18 at 11:36
-
https://angular.io/guide/singleton-services – Vikas Sep 29 '18 at 11:37
-
https://alligator.io/js/introduction-localstorage-sessionstorage/ – Vikas Sep 29 '18 at 11:38
-
https://stackoverflow.com/questions/50428320/angular-5-ngrx-state-lost-during-browser-page-refresh/50428436#50428436 – Vikas Sep 29 '18 at 11:38
1 Answers
0
Each page should be able to get all needed data by itself (resolvers, onInit). Because we should also be able to handle refresh
of a page. In some case it could be a good idea to cache BE response (services).

Buggy
- 3,539
- 1
- 21
- 38