aboutsummaryrefslogtreecommitdiffstats
path: root/src/Scope.js
diff options
context:
space:
mode:
authorMisko Hevery2010-03-29 21:49:12 -0700
committerMisko Hevery2010-03-29 21:49:12 -0700
commitd2d356918bd1c0c76673d22ff85c617fbd85d40e (patch)
tree994e3d03d86c53a1872a78d07ce4fcf3d28db3ed /src/Scope.js
parentcc6def854f2c77d0a7fea177df0dca858b8cd943 (diff)
downloadangular.js-d2d356918bd1c0c76673d22ff85c617fbd85d40e.tar.bz2
reenabled more tests
Diffstat (limited to 'src/Scope.js')
-rw-r--r--src/Scope.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Scope.js b/src/Scope.js
index 3e225653..cd4eb8ea 100644
--- a/src/Scope.js
+++ b/src/Scope.js
@@ -106,20 +106,23 @@ function createScope(parent, Class) {
$get: bind(instance, getter, instance),
$set: bind(instance, setter, instance),
- $eval: function(exp) {
+ $eval: function $eval(exp) {
if (isDefined(exp)) {
return expressionCompile(exp).apply(instance, slice.call(arguments, 1, arguments.length));
} else {
foreach(evalList, function(eval) {
instance.$tryEval(eval.fn, eval.handler);
});
+ var dirty = false;
foreach(watchList, function(watch) {
var value = instance.$tryEval(watch.watch, watch.handler);
if (watch.last !== value) {
+ dirty = true;
instance.$tryEval(watch.listener, watch.handler, value, watch.last);
watch.last = value;
}
});
+ if (dirty) $eval();
}
},