Patching local storage; authentication actions

This commit is contained in:
Will Marshall
2014-04-08 15:05:39 +10:00
parent a4cba99de6
commit 8495c13063
10 changed files with 34 additions and 55 deletions

View File

@@ -127,11 +127,12 @@
// If a value doesn't already exist store it as is
if (!publicMethods.get(storeName)) {
publicMethods.set(storeName, opts.defaultValue);
}
publicMethods.set(storeName, $parse(key)($scope) || opts.defaultValue);
} else {
// If it does exist assign it to the $scope value
$parse(key).assign($scope, publicMethods.get(storeName));
}
// If it does exist assign it to the $scope value
$parse(key).assign($scope, publicMethods.get(storeName));
// Register a listener for changes on the $scope value
// to update the localStorage value