While placing <ng-content>
within a <div *ngFor=...></div>
,the template comes within the last element of for-loop alone. It does not appear in all the iterated elements.
within my component html ->
<ats-tab [tabOptions]="equipmentTabOptions">
<ng-container class="tab-body">
<p>para</p> //content to appear in all the tabs
</ng-container>
</ats-tab>
within ats-tab.component.html ->
<div class="tab-content">
<div *ngFor="let item of tabOptions;" [attr.id]="item.id" class="tab-pane fade">
<ng-content select=".tab-body"></ng-content>
</div>
</div>
Can someone please help! :(