<div class="container">
<sub></sub>
</div>
<script>
function superDirective(){
return {
template: '<div>text</div>'
}
}
function subDirective(){
return {
template: '<super></super>',
replace: true
}
}
const app = angular.module("app", []);
app.directive('super', ['$injector', superDirective]);
app.directive('sub', ['$injector', subDirective]);
</script>
template: '<div><super></super></div>',