From example in my code.
tabs: object = [
{ key: 'tab1', value: 'tab1' },
{ key: 'tab2', value: 'tab2' },
{ key: 'tab3', value: 'tab3' },
];
<div [ngSwitch]="my_tab">
<div *ngFor="let tab of tabs" *ngSwitchCase="'{{ tab.key }}'">
{{ tab.value }}
</div>
</div>
I always get an error with this code. How to do this?
ng-container
somewhere but it's unclear what you're trying to achieve. Also note it's helpful to actually include the error. – Centro