Thank you both. Umi first for leading me to the explanation.

As it happens, I don't think you need the transclude either. It's much more 
obvious to just wrap the element which is all you're really doing anyway 
with the more complex (and difficult to follow) transclusion function.

Here's a revised plunker that shows what I 
mean: http://plnkr.co/edit/wp1J7hz2tFjKkJB48I7X?p=info

It all boils down to this:

app.directive('panel', function () {
    return {
        restrict: 'A',
        replace: false,

        link: function (scope, element, attrs, ctrl) {
            var wrapper = angular.element('<span 
class="transcluded"></span>')
            element.wrap(wrapper);
        }
    };
});


Am I really missing anything by manipulating the HTML myself in this 
fashion?

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to