I have a switch case with duplicated html code so I want to reduce this by using ng-container like below:
<div *ngSwitchCase="competences">
<ng-container *ngTemplateOutlet="commonOsiCatalogInfoContainer"></ng-container>
</div>
And here is the ng-template:
<ng-template #commonOsiCatalogInfoContainer>
<osi-catalog-info-container>
<div header>
{{ veld.titel }}
</div>
<div body>
<li *ngFor="let blok of veld.waarde">
<div class="s-margin-b">
<osi-li-h>{{ blok.toets_omschrijving }}</osi-li-h>
</div>
<ion-row *ngFor="let _veld of blok.velden" class="s-margin-b">
<ion-col col-auto class="work-form-title-col">
<osi-h4>{{_veld.titel}}</osi-h4>
<osi-li-body class="osi-black-87 d-block"><b>{{_veld.waarde}}</b></osi-li-body>
</ion-col>
</ion-row>
</li>
</div>
</osi-catalog-info-container>
</ng-template>
The only thing that differs is the osi-li-h value in some cases it is blok.title how can I make this osi-li-h dynamic in the ng-template?