Answer the question
In order to leave comments, you need to log in
How to pass/save parameters to queryParams and reuse when using reuse strategy?
Good day.
There is an application on angular 5. In it, for example, 2 components. For the first one, reuse strategy is set. Also, when the state of the component changes (for example, the user stumbled on something in the menu), this is written in queryParams to save the state at F5.
When navigating to the second component and back, queryParams get lost. In this case, the state of the first component is saved.
Question - is it possible to somehow substitute queryParams with reuseStrategy?
So far, I have done this - subscribed to routing events and if there is a transition to the desired component, I check the correspondence of the state and queryParams and substitute it if necessary.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question