When placing <ng-content> inside <div *ngFor=...></div> template is included in the last for-loop element. It does not appear in all repeating elements.
inside my html component ->
<ats-tab [tabOptions]="equipmentTabOptions"> <ng-container class="tab-body"> <p>para</p> //content to appear in all the tabs </ng-container> </ats-tab>
inside 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 anyone help !: (
source share