Saturday, 15 August 2015

javascript - Is it possible for Angular.JS to save someone's previous activity? -


I have an app that displays the products from an array. Using Angular JS, I can pull this array to generate on my view . In my view , the client can sort the list and filter so that they can find what they want is a way of saving those filters, so if they want to click on an item, So go to that page, then come back?

As of now, it will always load all the results without filters, even if a customer has clicked before a filter or two hands.

Is there any way to save their selection or past activity?

There is more than one way to do what you want to do:

    < Li> $ Cookies Using Cookies ($ Cookies);
  • Using LocalStorage
  • Using $ cacheFactory ($ cacheFactory), but with this option, you will lose data if the user leaves the session;

In all cases, the idea is to save the filter and selection at the desired location and to get back to me if necessary.

Hope this helps


No comments:

Post a Comment