aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMisko Hevery2012-04-03 14:15:42 -0700
committerMisko Hevery2012-04-03 16:02:20 -0700
commit7e86eacf301934335c22908ec6dbd1a083d88fab (patch)
tree9d10c77b967ee845e6a2fa0588893d82487a7975 /src
parent15c1fe392942b70e456f10afbdfd9c3329249a43 (diff)
downloadangular.js-7e86eacf301934335c22908ec6dbd1a083d88fab.tar.bz2
fix($compile): relax the restriction that directives can not add siblings
Relax the restriction that directives can not add siblings
Diffstat (limited to 'src')
-rw-r--r--src/ng/compiler.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/ng/compiler.js b/src/ng/compiler.js
index 4a95eefb..bbbcedb7 100644
--- a/src/ng/compiler.js
+++ b/src/ng/compiler.js
@@ -350,7 +350,7 @@ function $CompileProvider($provide) {
var linkingFns = [],
directiveLinkingFn, childLinkingFn, directives, attrs, linkingFnFound;
- for(var i = 0, ii = nodeList.length; i < ii; i++) {
+ for(var i = 0; i < nodeList.length; i++) {
attrs = new Attributes();
// we must always refer to nodeList[i] since the nodes can be replaced underneath us.
@@ -374,10 +374,6 @@ function $CompileProvider($provide) {
return linkingFnFound ? linkingFn : null;
/* nodesetLinkingFn */ function linkingFn(scope, nodeList, rootElement, boundTranscludeFn) {
- if (linkingFns.length != nodeList.length * 2) {
- throw Error('Template changed structure!');
- }
-
var childLinkingFn, directiveLinkingFn, node, childScope, childTransclusionFn;
for(var i=0, n=0, ii=linkingFns.length; i<ii; n++) {