(1) You can introduce rakish neighborhood stockpiling utilizing 3 diverse ways
$ bower install angular-local-storage --save
(2) Include rakish neighborhood storage.js (or precise nearby storage.min.js) from the dist registry in your index.html, subsequent to including Angular itself.
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js"></script>
<script src="bower_components/js/angular-local-storage.min.js"></script>
(3) now you can use this code for local storage using angular js
var myFirstApp = angular.module('myFirstApp', [ 'LocalStorageModule' ]);
myFirstApp.controller('myCtrl', function($scope , localStorageService) {
$scope.saveRecord = function( $index , $dataArray ){
if (localStorageService.set( $index , $dataArray)) {
return true;
}
return false
};
$scope.saveRecord( "users" , { "name" : "johan" } );
});