diff options
Diffstat (limited to 'src/Scope.js')
| -rw-r--r-- | src/Scope.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Scope.js b/src/Scope.js index 9a20c214..687d3628 100644 --- a/src/Scope.js +++ b/src/Scope.js @@ -127,10 +127,11 @@ function createScope(parent, services, existing) { var watch = expressionCompile(watchExp), last; function watcher(){ - var value = watch.call(instance); + var value = watch.call(instance), + lastValue = last; if (last !== value) { last = value; - instance.$tryEval(listener, exceptionHandler, value, last); + instance.$tryEval(listener, exceptionHandler, value, lastValue); } } instance.$onEval(PRIORITY_WATCH, watcher); |
