foreword
for training, I wanted to create a tab directive that can be used with simple markup (based on user elements, without ng-click or such automatically created tabs).
problem
basic setup was more or less easy, and works well, with one exception: when I want to add is automatically created with the help of tabs .prepend(...), I get the following error, dropped : TypeError: Cannot read property 'childNodes' of undefined.
wired bit: nav is generated and added as expected.
even more wired: use .append(..)works just fine - no errors.
so that's what i did
, , prepend-
( , )
var $template = angular.element($templateCache.get('tabs/templates/tabNav.html'));
var $nav = $compile($template)($scope);
$element.prepend($nav);
. http://plnkr.co/edit/yyTCoPQd4ld3w7kDDFCS?p=preview.
, plunkr ( shebang ), - .
, , - , .
.