diff options
| author | Misko Hevery | 2010-03-22 16:07:42 -0700 | 
|---|---|---|
| committer | Misko Hevery | 2010-03-22 16:07:42 -0700 | 
| commit | 6f8276a8e3735396999bd158005ca86bb1bb0978 (patch) | |
| tree | 23bc9ff28e335ef75bac8e7473861e41191625c7 /src/Scope.js | |
| parent | d4ba33d075fea5e86963a9ff4982e433fc8c7968 (diff) | |
| download | angular.js-6f8276a8e3735396999bd158005ca86bb1bb0978.tar.bz2 | |
ng-watch directive
Diffstat (limited to 'src/Scope.js')
| -rw-r--r-- | src/Scope.js | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Scope.js b/src/Scope.js index d22604fd..7b1d2673 100644 --- a/src/Scope.js +++ b/src/Scope.js @@ -207,6 +207,10 @@ Scope.prototype = {    },    addWatchListener: function(watchExpression, listener) { +    // TODO: clean me up! +    if (!isFunction(listener)) { +      listener = bind(this, this.compile(listener), {scope: this, self: this.state}); +    }      var watcher = this.watchListeners[watchExpression];      if (!watcher) {        watcher = {listeners:[], expression:watchExpression};  | 
