aboutsummaryrefslogtreecommitdiffstats
path: root/src/Scope.js
diff options
context:
space:
mode:
authorIgor Minar2010-08-16 10:56:03 -0700
committerIgor Minar2010-08-16 10:56:03 -0700
commit59401b80ee36d56f7ede551669633abbc6dd1e24 (patch)
tree113669e99faae192d0bb89adc4f74db6f22fefd0 /src/Scope.js
parent9899959d695a97ddbb3e9a626a769efa714bffe7 (diff)
parentf09415d0de5d383efc9e2cb35d1323a5aac2371d (diff)
downloadangular.js-59401b80ee36d56f7ede551669633abbc6dd1e24.tar.bz2
Merge remote branch 'upstream/master'
Diffstat (limited to 'src/Scope.js')
-rw-r--r--src/Scope.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Scope.js b/src/Scope.js
index 86d5bc14..27fafc3a 100644
--- a/src/Scope.js
+++ b/src/Scope.js
@@ -44,9 +44,10 @@ function setter(instance, path, value){
}
///////////////////////////////////
-
-var getterFnCache = {};
-var JS_KEYWORDS = {};
+var scopeId = 0;
+ getterFnCache = {},
+ compileCache = {},
+ JS_KEYWORDS = {};
foreach(
["abstract", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", "debugger", "default",
"delete", "do", "double", "else", "enum", "export", "extends", "false", "final", "finally", "float", "for", "function", "goto",
@@ -75,7 +76,7 @@ function getterFn(path){
code += ' type = angular.Global.typeOf(last);\n';
code += ' fn = (angular[type.charAt(0).toUpperCase() + type.substring(1)]||{})["' + name + '"];\n';
code += ' if (fn)\n';
- code += ' self = function(){ return fn.apply(last, [last].concat(slice.call(arguments, 0, arguments.length))); };\n';
+ code += ' self = function(){ return fn.apply(last, [last].concat(Array.prototype.slice.call(arguments, 0, arguments.length))); };\n';
code += ' }\n';
}
});
@@ -88,7 +89,6 @@ function getterFn(path){
///////////////////////////////////
-var compileCache = {};
function expressionCompile(exp){
if (typeof exp === 'function') return exp;
var fn = compileCache[exp];
@@ -108,7 +108,6 @@ function errorHandlerFor(element, error) {
elementError(element, NG_EXCEPTION, isDefined(error) ? toJson(error) : error);
}
-var scopeId = 0;
function createScope(parent, services, existing) {
function Parent(){}
function API(){}