|
|
|
@ -69,6 +69,10 @@ var YourCtrl = function($scope, localStorageService, ...) {
|
|
|
|
|
localStorageService.set('localStorageKey','Add this!');
|
|
|
|
|
// Read that value back
|
|
|
|
|
var value = localStorageService.get('localStorageKey');
|
|
|
|
|
// To remove a local storage
|
|
|
|
|
localStorageService.remove('localStorageKey');
|
|
|
|
|
// Removes all local storage
|
|
|
|
|
localStorageService.clearAll();
|
|
|
|
|
// You can also play with cookies the same way
|
|
|
|
|
localStorageService.cookie.add('localStorageKey','I am a cookie value now');
|
|
|
|
|
}</pre>
|
|
|
|
|