MyComponent for example:
<div [my-component]="'text'"></div>
In code I have this.viewContainerRef
which is the node itself (<div>
).
But the user may want to add its template to myComponent
, so he will do this:
<div [my-component]="'text'">
<template>
...
</template>
</div>
My question is how in code I can check if there is a <template>
node and use/read its innerHTML?