1 year ago
#322388
elia
Angular RouteReuseStrategy
I have a doubt regarding RouteReuseStrategy. The main concept is clear and I implemented it to have the previous state from a list to the detail component with the shouldReuse data:
{ path: 'list', component: AppointmentListComponent, data: {shouldReuse: true}},
and works as expected.
But the flow shoud be like this:
Homepage -> List (http call) -> Detail (http call)
when I go back from Detail to List the http call is not triggered (it's fine), but if I go back to the Homepage or any kind of links present into the menu, when I come back to the List (from other parts of the application) I'd like to redo the http call in order to have fresh data.
Basically, I'd like to clean the stored route if I'm going out of my List component, for example I'm going to the Profile page
UPDATE: At the moment I put a data.key into the routing, and if the keys are different I'll clear the stored routes
Any Idea?
angular
angular-routing
angular-router
0 Answers
Your Answer