-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamically change the storage type from controller itself. #315
Comments
I agree that this would be nice. A workaround might be to set the storage type to localStorage and then do something like this to clear storage when the session ends:
|
ask for this feature too. I want to store something in the local storage to persistent, but I also want something in session storage that will be deleted when the user close the window. I supports to add some api like |
Desperately need this too, so cooked up this simple patch. Right before a set, switch type with either of these: or use: if storageType omitted, then previous type is used. Use setStorageType to reset, so the default for your project is not disturbed. --- angular-local-storage.js
@@ -122,12 +122,18 @@
|
the patch doesn't display as it should. (+ - are messed up) |
Looking to use both Local Storage as well as Session Storage. Iniitally Configured the module to use 'localstorage'
localStorageServiceProvider.setStorageType('localStorage')
.But What if I want to session storage somewhere in middle of the application.
The text was updated successfully, but these errors were encountered: