I'd would like to transclude content from a template url instead of from within the body of the directive tags.
Using a modal as an example, you could see the need to have the modal directive declaring a template url for the modal wrapper markup, however for the transcluded content instead of sourcing that content from within the directive tags (some modals may have extensive markup) I'd like to use a template url to provide the transluded content. Thus provided a much cleaner abstraction layer for the component.
i.e.
homeView.html
<my-modal transclude-content="profile"></my-modal>
modalDirective.js
app.directive('modal', function() {
return {
templateUrl: 'app/shared/modalView.html',
// some nifty way to transclude content from say 'app/shared/partials/' + attr.transcludeContent + '.html
};
});
modalView.html
<div class="modal">
<div class="modal-controls">
<span class="minimize">-</span>
<span class="close">x</span>
</div>
<div class="modal-body" ng-transclude>
</div>
</div>