diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Compiler.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Compiler.js b/src/Compiler.js index 08c76eea..f8d1e0f0 100644 --- a/src/Compiler.js +++ b/src/Compiler.js @@ -191,6 +191,11 @@ Compiler.prototype = { var index = 0, template, parent = templateElement.parent(); + if (templateElement.length > 1) { + // https://github.com/angular/angular.js/issues/338 + throw Error("Cannot compile multiple element roots: " + + jqLite('<div>').append(templateElement.clone()).html()); + } if (parent && parent[0]) { parent = parent[0]; for(var i = 0; i < parent.childNodes.length; i++) { |
