I have two directives called container
and item
.
directive('container', function(){
return {
replace: true,
template: "<div>contains <p>...</p> </div>'
}
});
directive('item', function(){
return {
replace: true,
template: "item"
}
});
These directives are intended to be used in the following way:
<container>
<item>
<item>
<item>
</container>
The expected output HTML should look like this:
<div>contains <p>item item item </p> </div>
How can I extract the item
directives from the content of the container
directive and render them as repeatable directives in place of the ...
within the container template?