You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
I created a directive. I use the transclude function passed by compile to clone one element of the original DOM into my template DOM.
compile: function(cElt,cAttrs,transclude){returnfunction($scope,lElt,lAttrs){// some codetransclude($scope,function(clone){varthead=clone.find('thead');lElt.append(thead);});// some code};}
clone is a JQLite array-like object and when you call find(tagName) on it, it calls find(tagName) on each element and group the results. The problem is that clone can contain text nodes and behind the scenes, find(tagName) uses getElementsByTagName which doesn't work on text nodes.