Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. angular
  2. .module('storageModule', [])
  3. .factory('store',['$window', function($window){
  4. return {
  5. setLocal: function( key, value ){
  6. //code to store the key & value pair in localStorage
  7. },
  8. getLocal: function( key ){
  9. //code to get the key stored in localStorage
  10. },
  11. setSession: function( key, value ){
  12. //code to store the key & value pair in sessionStorage
  13. },
  14. getSession: function( key ){
  15. //code to get the key stored in sessionStorage
  16. }
  17. }
  18. }]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement