diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Scope.js | 7 | ||||
| -rw-r--r-- | src/apis.js | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/Scope.js b/src/Scope.js index fe0b6ce3..70869b3b 100644 --- a/src/Scope.js +++ b/src/Scope.js @@ -60,11 +60,12 @@ function expressionCompile(exp){ // TODO(remove this hack) function parserNewScopeAdapter(fn) { return function(){ + var self = this; return fn({ - state: this, + state: self, scope: { - set: this.$set, - get: this.$get + set: function(key, value){ return setter(self, key, value);}, + get: function(key) { return getter(self, key); } } }); }; diff --git a/src/apis.js b/src/apis.js index 5864ad60..166ca27c 100644 --- a/src/apis.js +++ b/src/apis.js @@ -297,7 +297,7 @@ var angularFunction = { return expression; } else if (expression){ return function($) { - return createScope($).$eval(expression); + return expressionCompile(expression).apply($); }; } else { return identity; |
