0

It is possible to save state of a controller when html page is closed and restore the state again when the page is open in AngularJs? If yes can you give me an example? Thank you!

Stefi Pallo
  • 111
  • 1
  • 9
  • 1
    It should be theoretically possible using cookies or localstorage, but **you** should give **us** an example of what you tried, and we'll try helping with the code :) – doldt Mar 27 '15 at 11:06
  • I've been using this library with much success: https://github.com/agrublev/angularLocalStorage it handles session persistance through local storage with cookie fallback. – Qiong Wu Mar 27 '15 at 11:12
  • Thanks both of you! I'll try to make something on my own :) – Stefi Pallo Mar 27 '15 at 12:24
  • any progress? if you solved your problem, post a basic solution to help others out! :) – Ken Bellows Feb 19 '16 at 20:06
  • Hello guys! Sorry for the soooo late answer. I was off for more than a year. I managed to save the controller state at an end. I used local storage feature (see the post here: https://stackoverflow.com/questions/18247130/how-do-i-store-data-in-local-storage-using-angularjs). It fit my needs then an it was simple to use. – Stefi Pallo Jul 31 '17 at 17:34

0 Answers0