This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Loading a template (url or string) in a directive with root element invalid as div chidlren throw Error: Template must have exactly one root element #2848
Comments
As part of our effort to clean out old issues, this issue is being automatically closed since it has been inactivite for over two months. Please try the newest versions of Angular ( Thanks! |
Tested with 1.2.0-rc.1 and the problem is still present http://jsbin.com/IviLado/1/edit |
+1 This is still an issue as of 1.2.3 |
I'm bored, I'll try and write a patch to make this work if I don't see any pull requests already opened |
@caitp Thank you! |
khepin
pushed a commit
to khepin/angular.js
that referenced
this issue
Feb 19, 2014
If the first element in a template is a <tr>, <th>, <td>, or <tbody> tag, the HTML compiler will ensure that the template is wrapped in a <table> element so that the table content is not discarded. Closes angular#2848 Closes angular#1459 Closes angular#3647 Closes angular#3241
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have a template with a single tr as root
when the template is compiled the source is wrapped with a div to get the content. tds and trs are not valid children of a div so they are stripped out from the DOM leaving
code
anda
tagsjsbin: http://jsbin.com/eyodiq/4
The text was updated successfully, but these errors were encountered: