diff options
Diffstat (limited to 'www/js/ionicUtils.js')
| -rw-r--r-- | www/js/ionicUtils.js | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/www/js/ionicUtils.js b/www/js/ionicUtils.js index c593624c..5cfa5d7b 100644 --- a/www/js/ionicUtils.js +++ b/www/js/ionicUtils.js @@ -6,27 +6,22 @@ angular.module('ionic.utils', []) -.factory('$localstorage', ['$window', function($window) -{ + .factory('$localstorage', ['$window', function ($window) { return { - init: function() {}, + init: function () {}, - set: function(key, value) - { - $window.localStorage[key] = value; - }, - get: function(key, defaultValue) - { - return $window.localStorage[key] || defaultValue; - }, - setObject: function(key, value) - { - $window.localStorage[key] = JSON.stringify(value); - }, - getObject: function(key) - { - return JSON.parse($window.localStorage[key] || '{}'); - } + set: function (key, value) { + $window.localStorage[key] = value; + }, + get: function (key, defaultValue) { + return $window.localStorage[key] || defaultValue; + }, + setObject: function (key, value) { + $window.localStorage[key] = JSON.stringify(value); + }, + getObject: function (key) { + return JSON.parse($window.localStorage[key] || '{}'); + } }; -}]); + }]); |
