From 0e88e35e5c76420c48a487718558d33e452ea1eb Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Sun, 30 May 2010 15:45:33 -0700 Subject: remove the uneeded call to createScope when evaluating expressions --- src/Scope.js | 7 ++++--- src/apis.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src') 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; -- cgit v1.2.3