|
|
|
@ -35,23 +35,13 @@
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.$get = ['$rootScope',function($rootScope){
|
|
|
|
|
|
|
|
|
|
var prefix = this.prefix;
|
|
|
|
|
// If there is a prefix set in the config lets use that with an appended period for readability
|
|
|
|
|
//var prefix = angularLocalStorage.constant;
|
|
|
|
|
if (prefix.substr(-1)!=='.') {
|
|
|
|
|
prefix = !!prefix ? prefix + '.' : '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Checks the browser to see if local storage is supported
|
|
|
|
|
var browserSupportsLocalStorage = function () {
|
|
|
|
|
try {
|
|
|
|
|
return ('localStorage' in window && window.localStorage !== null);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
$rootScope.$broadcast('LocalStorageModule.notification.error',e.message);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Checks the browser to see if local storage is supported
|
|
|
|
|
var browserSupportsLocalStorage = function () {
|
|
|
|
|
try {
|
|
|
|
|