Retain page data on refreshing the page

Nutan picture Nutan · Jun 4, 2014 · Viewed 42.8k times · Source

I am new to angular. I am using a service which gets a list of objects and displays them on the 1st page. Then based on what object was clicked, I am setting the tab header on the next page. But while I am refreshing the page the scope of the list is lost and the tab header is throwing the exception resulting the page to not display the information. Is there any way to retain the information that which object was clicked on previous screen even when refreshing the 2nd page?

Answer

V31 picture V31 · Jun 4, 2014

You can make use of angular local storage

Angular Local Storage

Example how to use it:

Example To Use Local Storage