My child-component looks like:
...
@Component({
selector: '[child-component]'
templateUrl: './child.template.html'
})
...
and my parent template like:
<span child-component [someInput]="123"></span>
now I want to render the content of my child component without the <span>
container around it. I want no container at all in my parent component's template, just the content of our child-component's template.
I tried some other tags already.
<ng-content>
(nothing rendered at all)<ng-template>
(Components on an embedded template:)<ng-container>
(Failed to execute 'appendChild' on 'Node')
Thanks in advance!
Finally found a working soltion!
My child-component looks like:
My child template looks like:
and my parent template like:
This way there is no wrapper at all.