Reputation: 26670
Which methods could be used with Angular.js to make $rootScope.myVar variable survive page reload except putting it to cookies or retrieving from server periodically with a $http request?
Upvotes: 2
Views: 721
Reputation: 108491
Why not use some sort of local storage wrapper like Lawnchair JS? It's got an adapter pattern so you can hook it up to whatever you like, but it defaults to local storage.
Upvotes: 3