aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/compile.js
diff options
context:
space:
mode:
authorIgor Minar2012-10-25 00:47:47 -0700
committerIgor Minar2012-10-29 19:38:29 -0700
commit4e45a2f8e2149c38eaed8b9855873c165f8c5361 (patch)
treeb9e88abba179229b206d703484ff41439e69b0c9 /src/ng/compile.js
parent4dbd8452eb93b700c8aaafb7efb97cc20a2c0ff0 (diff)
downloadangular.js-4e45a2f8e2149c38eaed8b9855873c165f8c5361.tar.bz2
refactor($compile): simplify nodeLinkFn
Diffstat (limited to 'src/ng/compile.js')
-rw-r--r--src/ng/compile.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ng/compile.js b/src/ng/compile.js
index ae926923..9b612131 100644
--- a/src/ng/compile.js
+++ b/src/ng/compile.js
@@ -706,12 +706,12 @@ function $CompileProvider($provide) {
}
$element = attrs.$$element;
- if (newScopeDirective && isObject(newScopeDirective.scope)) {
+ if (newIsolatedScopeDirective) {
var LOCAL_REGEXP = /^\s*([@=&])\s*(\w*)\s*$/;
var parentScope = scope.$parent || scope;
- forEach(newScopeDirective.scope, function(definiton, scopeName) {
+ forEach(newIsolatedScopeDirective.scope, function(definiton, scopeName) {
var match = definiton.match(LOCAL_REGEXP) || [],
attrName = match[2]|| scopeName,
mode = match[1], // @, =, or &
@@ -734,7 +734,7 @@ function $CompileProvider($provide) {
// reset the change, or we will throw this exception on every $digest
lastValue = scope[scopeName] = parentGet(parentScope);
throw Error(NON_ASSIGNABLE_MODEL_EXPRESSION + attrs[attrName] +
- ' (directive: ' + newScopeDirective.name + ')');
+ ' (directive: ' + newIsolatedScopeDirective.name + ')');
};
lastValue = scope[scopeName] = parentGet(parentScope);
scope.$watch(function parentValueWatch() {
@@ -765,7 +765,7 @@ function $CompileProvider($provide) {
default: {
throw Error('Invalid isolate scope definition for directive ' +
- newScopeDirective.name + ': ' + definiton);
+ newIsolatedScopeDirective.name + ': ' + definiton);
}
}
});