A Storage done right for AngularJS.
sessionStorageby default but if it's not available, it uses
- Lets you save JS Objects
- If you save a
Number, you get a
Number, not a String
- Uses a caching system so that if you already have a value, it won't get it from the store again.
You have several options:
bower install a0-angular-storage
npm install angular-storage
You can also create namespaced storages if you want
Changing storage type
Sets the underlying store for the
store service. It can be
cookieStorage. Defaults to
Sets a new
value to the storage with the key
name. It can be any object.
Returns the saved
value with they key
name. If you saved an object, you get an object.
Deletes the saved
value with the key
Returns a new
store service that will use the
delimiter when saving and getting values like the following
namespace[delimiter]key. For example
. as a
This library is used in auth0-angular
Just clone the repo, run
bower install and then
gulp to work :).
If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.
This project is licensed under the MIT license. See the LICENSE file for more info.