An AngularJS module that gives you access to the browsers local storage with cookie fallback
This repository has been archived on 2020-10-11. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
2014-05-06 18:59:29 -04:00
demo demo.html example update 2014-04-30 10:38:40 +08:00
test - Adds the deriveQualifiedKey and deriveKey methods to ca;culate the key 2014-05-06 18:55:57 -04:00
.bowerrc Add Grunt to automate testing and linting. Add Karma to run tests 2013-09-23 14:01:30 -07:00
.gitattributes add git files to the repo 2013-09-23 12:42:51 -07:00
.gitignore - Adds Vim swap files to .gitignore 2014-05-06 18:59:29 -04:00
.travis.yml Setup for continuous integration 2014-05-01 00:48:18 -04:00
angular-local-storage.js - Adds the deriveQualifiedKey and deriveKey methods to ca;culate the key 2014-05-06 18:55:57 -04:00
angular-local-storage.min.js Fixed browser local storage support bug 2014-05-01 00:29:10 -04:00
bower.json Fixed browser local storage support bug 2014-05-01 00:29:10 -04:00
Gruntfile.js Updated for tests and linting 2014-02-19 23:40:06 -05:00
LICENSE Changed license to MIT 2013-09-23 12:40:30 -04:00
package.json Fixed browser local storage support bug 2014-05-01 00:29:10 -04:00
README.md Changed readme and demo references to set rather than add 2014-04-17 13:43:29 +09:00

angular-local-storage

An Angular module that gives you access to the browsers local storage

Build Status

Example use:

angular.module('yourModule', ['LocalStorageModule'])
.controller('yourCtrl', [
  '$scope',
  'localStorageService',
  function($scope, localStorageService) {
    // Start fresh
    localStorageService.clearAll();
    localStorageService.set('Favorite Sport','Ultimate Frisbee');
}]);

/*
To set the prefix of your localStorage name, you can use the setPrefix method 
available on the localStorageServiceProvider
*/
angular.module('yourModule', ['LocalStorageModule'])
.config(['localStorageServiceProvider', function(localStorageServiceProvider){
  localStorageServiceProvider.setPrefix('newPrefix');
}]);

Check out the full demo and documentation at http://gregpike.net/demos/angular-local-storage/demo.html

To do:

  • Add tests
  • Expand Readme