From e88c4f5f5fb6e26c3a75e534b5baee272da31b34 Mon Sep 17 00:00:00 2001 From: Ariel Mashraki Date: Tue, 4 Nov 2014 23:00:35 +0200 Subject: [PATCH] fix(localStorageProvider): issue #165 --- src/angular-local-storage.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/angular-local-storage.js b/src/angular-local-storage.js index 4f852e8..b209562 100644 --- a/src/angular-local-storage.js +++ b/src/angular-local-storage.js @@ -30,11 +30,13 @@ angularLocalStorage.provider('localStorageService', function() { // Setter for the prefix this.setPrefix = function(prefix) { this.prefix = prefix; + return this; }; // Setter for the storageType this.setStorageType = function(storageType) { - this.storageType = storageType; + this.storageType = storageType; + return this; }; // Setter for cookie config @@ -43,11 +45,13 @@ angularLocalStorage.provider('localStorageService', function() { expiry: exp, path: path }; + return this; }; // Setter for cookie domain this.setStorageCookieDomain = function(domain) { this.cookie.domain = domain; + return this; }; // Setter for notification config @@ -57,6 +61,7 @@ angularLocalStorage.provider('localStorageService', function() { setItem: itemSet, removeItem: itemRemove }; + return this; }; this.$get = ['$rootScope', '$window', '$document', '$parse', function($rootScope, $window, $document, $parse) {