Issue
How to Store angularJS Variable Data into local temp storage for further usage as like session in server side.
The AngularJS Source Code is
var pApp = angular.module('ProfileIndex', []);
pApp.controller('ProfileIndexCtrl', function($scope, $http, $cacheFactory) {
$scope.data = "MVVM";
});
How to Store the MVVM value in the local storage? and how to retrieve the value from the local storage?
Solution
Simply use the web storage API
// set "data" to "MVVM"
$window.localStorage.setItem('data', 'MVVM');
// get "data"
$window.localStorage.getItem('data');
Answered By - Phil
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.