This is my parent component html
<app-card>
<div class="body">This is body</div>
<div class="title">This is title</div>
</app-card>
This is my CardComponent
<div class="card">
<ng-content select=".title"></ng-content>
<ng-content select=".body"></ng-content>
</div>
So I want to access this element (<div class="body">This is body</div>
) in the CardComponent,
If it was a component I could have access it by ContentChild but how to access this?
I tried using template variable (passing the variable name in the ContentChild) and tried to access it form ngAfterContentInit getting undefined