Restore the query parameters for a state

183 views Asked by At

What is the best approach for storing the query parameters for a state. For example, I have a state issues with the url like this issues/search?keyword=query&date=4/12/15

When the user navigates away from this state, and then go back to this state is there a way to restore that query string?

The idea, being, is to allow the user to return to the search results.

What is a good way to go about this?

1

There are 1 answers

0
ShankarSangoli On BEST ANSWER

I think instead of rerendering the search results by reading the querstring params you can take a look at stick states here http://christopherthielen.github.io/ui-router-extras/#/sticky

This way you can optimize your application by preserving the states which involve heavy transactions like searching and at the same time i solves your problem.