Search code examples
angularjsmeanjsswig-template

Changing states without reloading previous view data when I go back to it


I am new to angular and was wondering if I could somehow change states (after clicking on link from a list of search results) and load a new view, hide the old one (including header !), but not unload it/not have to request JSON data again if I got back to the search results for products view from the product details view.


Solution

  • Well, this will be a really short answer. Take a look at this:

    $templateCache You can play around with it so you won't need to reload pages when going back and forth.