ディレクティブのスコープに値を渡すことで、templateUrlをその場で変更することは可能ですか?ディレクティブから渡されたデータに基づいてページをレンダリングするコントローラーにデータを渡したい
多分そのように見える何か:
<div>
<boom data="{{myData}}" />
</div>
.directive('boom', function {
return {
restrict: 'E',
transclude: true,
scope: 'isolate',
locals: { data: 'bind' },
templateUrl: "myTemplate({{boom}}})" // <- that of course won't work.
}
});