Merge pull request #103 from darrylhebbes/patch-1

Update README.md
revert-117-master
Gregory Pike 10 years ago
commit 2c57fdf15e

@ -27,6 +27,20 @@ angular.module('yourModule', ['LocalStorageModule'])
localStorageServiceProvider.setPrefix('newPrefix');
}]);
```
#### How to bind to a $scope variable:
Usage: localStorageService.bind(scope, key, def);
```
// Example
$scope.anArtist = {'firstname':'Pablo', 'lastname':'Picasso'};
// Bind to local storage service
localStorageService.bind($scope, 'anArtist', anArtist);
// get bound data:
console.log(localStorageService.get('anArtist'));
```
Check out the full demo and documentation at http://gregpike.net/demos/angular-local-storage/demo.html
To do: