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
Wrapping root text elements of $compile in span causes issues #1059
Comments
At least empty nodes should be ignored. if (node.nodeType == 3 /* text node */ && node.childNodes.length /* non-empty */) {
$compileNode[index] = jqLite(node).wrap('<span>').parent()[0];
} |
I'm having this issue as well. This code fixes the problem. Thanks! |
Yeah, transcluding a more complex body of an element (and not just some hello world stuff) results currently in a huge bloat of empty spans. If you care about your markup (and you should) this issue is really a no go. |
IgorMinar
pushed a commit
to IgorMinar/angular.js
that referenced
this issue
Jan 17, 2013
petebacondarwin
added a commit
that referenced
this issue
Jan 17, 2013
jamessharp
pushed a commit
to jamessharp/angular.js
that referenced
this issue
Jan 18, 2013
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
$compile wraps root text elements in span's so that it can attach data elements. This cause issues with transclusion since it can add int
The text was updated successfully, but these errors were encountered: