Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- angular
- .module('storageModule', [])
- .factory('store',['$window', function($window){
- return {
- setLocal: function( key, value ){
- //code to store the key & value pair in localStorage
- },
- getLocal: function( key ){
- //code to get the key stored in localStorage
- },
- setSession: function( key, value ){
- //code to store the key & value pair in sessionStorage
- },
- getSession: function( key ){
- //code to get the key stored in sessionStorage
- }
- }
- }]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement