Closed zachsnow closed 10 years ago
Hey John, thanks for the link! I'm checking it out.
@thejohnfreeman it is a nice simplification to just require library consumers to use the compile
function returned from ngTemplate
, maybe I should stop trying to integrate with regular transclusion so much... Thanks again.
The above example doesn't make sense in terms of regular transclusion, in which the nodes to be inserted into the template "hole" are expected to be compiled and linked in the context in which they appear, and then inserted into the hole. In this example we want to link them in the context of the hole (presumably so that the object secondary
is available in the secondary template). We will probably need to add a different directive for that.
Consider a regular multi-transclude template:
There are two blocks to be filled. Now we might want to wrap the
secondaryItem
block in anng-repeat
so we can use it for several secondary items:This currently doesn't work (and certainly wouldn't work if we put the
ng-repeat
on the same element as theng-multi-transclude
). But it would be cool if it did.See #5 for the original issue.