Last active
August 29, 2015 14:11
-
-
Save pankajpatel/8ffdaa369e2cbaa42abe to your computer and use it in GitHub Desktop.
Sample Angular Module File
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} | |
} | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment