gsklee / ngStorage

localStorage and sessionStorage done right for AngularJS.
MIT License
2.34k stars 461 forks source link

$sessionStorage get undefined after refreshing the page but $localStorage not #263

Open ansontp22 opened 7 years ago

ansontp22 commented 7 years ago

I'm using $sessionStorage to store value in session and this is my line of code

$sessionStorage.STORE_ID = '23'; . but every time I refresh the page am getting undefined when i try to retrieve the value. am retrieving by using the following method var id = $sessionStorage.STORE_ID; I've tried with $localStorage. it is working fine. so what is the problem with $sessionStorage. Does it has any limitations? or Do I need to add any extra code to work with $sessionStorage. Otherwise I might modify everywhere by replace that with $localStorage.

Any help please

Regards Anson

MarkRihter commented 5 years ago

@ansontp22 Faced the same problem. Still haven't found a solution?