Skip to content

Commit 52d04ad

Browse files
committed
build(v0.1.3): bump version 0.1.3
1 parent d4e3f76 commit 52d04ad

File tree

5 files changed

+11
-14
lines changed

5 files changed

+11
-14
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
angular-local-storage
22
=====================
33

4-
An Angular module that gives you access to the browsers local storage, **v0.1.2**
4+
An Angular module that gives you access to the browsers local storage, **v0.1.3**
55

66
[![Build Status](https://secure.travis-ci.org/grevory/angular-local-storage.png?branch=master)](https://travis-ci.org/grevory/)
77

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-local-storage",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"homepage": "http://gregpike.net/demos/angular-local-storage/demo.html",
55
"authors": [
66
"grevory <[email protected]>"

dist/angular-local-storage.js

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* An Angular module that gives you access to the browsers local storage
3-
* @version v0.1.2 - 2014-10-10
3+
* @version v0.1.3 - 2014-10-14
44
* @link https://github.com/grevory/angular-local-storage
55
* @author grevory <[email protected]>
66
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -394,11 +394,8 @@ angularLocalStorage.provider('localStorageService', function() {
394394

395395
// Add a listener on scope variable to save its changes to local storage
396396
// Return a function which when called cancels binding
397-
var bindToScope = function(scope, scopeKey, def, lsKey) {
398-
if (!lsKey) {
399-
lsKey = scopeKey;
400-
}
401-
397+
var bindToScope = function(scope, key, def, lsKey) {
398+
lsKey = lsKey || key;
402399
var value = getFromLocalStorage(lsKey);
403400

404401
if (value === null && isDefined(def)) {
@@ -407,11 +404,11 @@ angularLocalStorage.provider('localStorageService', function() {
407404
value = extend(def, value);
408405
}
409406

410-
$parse(scopeKey).assign(scope, value);
407+
$parse(key).assign(scope, value);
411408

412-
return scope.$watchCollection(scopeKey, function(newVal) {
409+
return scope.$watch(key, function(newVal) {
413410
addToLocalStorage(lsKey, newVal);
414-
});
411+
}, isObject(scope[key]));
415412
};
416413

417414
// Return localStorageService.length

dist/angular-local-storage.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-local-storage",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"description": "An Angular module that gives you access to the browsers local storage",
55
"homepage": "https://github.com/grevory/angular-local-storage",
66
"main": "./dist/angular-local-storage.js",

0 commit comments

Comments
 (0)