An AngularJS module that gives you access to the browsers local storage with cookie fallback. You can install angular-local-storage using 3 different ways. For local testing (when you are testing on localhost) set the domain to an empty string ''. Setting the domain to 'localhost' will not work on all browsers (eg. Chrome) since some browsers only allow you to set domain cookies for registry-controlled domains, i.e. something ending in .com or so, but not IPs or intranet hostnames like localhost. Configure whether events should be broadcasted on $rootScope for each action. You can also dynamically change storage type by passing the storage type as the last parameter for any of the API calls.
Features
- You could set a prefix to avoid overwriting any local storage variables from the rest of your app
- You could change web storage type to localStorage or sessionStorage
- Set cookie options (usually in case of fallback)
- If localStorage is not supported, the library will default to cookies instead
- Change the local storage prefix during execution Returns
- You can also dynamically change storage type by passing the storage type as the last parameter for any of the API calls
License
MIT LicenseFollow angular-local-storage
Other Useful Business Software
$300 Free Credits to Build on Google Cloud
Start your next project with $300 in free Google Cloud credit. Spin up VMs, run containers, query petabytes in BigQuery, or build agents with Gemini Enterprise Agent Platform. Once your credits are used, keep building with 20+ always-free tier products including Compute Engine, Cloud Storage, GKE, and Cloud Run functions. No commitment required—just sign up and start building.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of angular-local-storage!