aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-01-23 11:43:54 +0200
committerArtur Signell <artur@vaadin.com>2015-01-23 11:43:54 +0200
commitab7dcc448f8ee90fccdff7b1dfd9adb640306ef3 (patch)
treeaba6b5a4640e752ae0bb3d3bfe87750cdbe71da3
parent7c857fad5bcc3018ae1203550ea969ef8ac8aced (diff)
downloadvaadin-core-ab7dcc448f8ee90fccdff7b1dfd9adb640306ef3.tar.gz
vaadin-core-ab7dcc448f8ee90fccdff7b1dfd9adb640306ef3.zip
Upgrading version 0.1.0
-rw-r--r--ng-vaadin.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/ng-vaadin.js b/ng-vaadin.js
index 760a85b..d902b98 100644
--- a/ng-vaadin.js
+++ b/ng-vaadin.js
@@ -22,21 +22,19 @@
attributes : true
});
- scope.$watch(function() {
- for ( var attr in attrMap) {
- var value = element.attr(attr);
- var tokens = attrMap[attr].split(/\./);
+ for (var attr in attrMap) {
+ scope.$watch(function() {return element.attr(attr)}, function(value, oldValue) {
var parent = scope;
+ var tokens = attrMap[attr].split(/\./);
for (var i = 0; i < tokens.length - 1; i++) {
if (typeof (parent[tokens[i]]) == 'undefined') {
parent[tokens[i]] = {};
}
parent = parent[tokens[i]];
}
- // console.log(tokens[tokens.length - 1] + " " + value);
parent[tokens[tokens.length - 1]] = value;
- }
- });
+ });
+ }
}
};
}