What are the differences between [ngSwitch]
and a bunch of *ngIf
s. Any performance factors we should be concerned about?
*ngIf
<div *ngIf="day === 'MONDAY'">
Keep calm and pretend it's not Monday.
</div>
...
<div *ngIf="day === 'FRIDAY'">
Happy Friday!
</div>
[ngSwitch]
<ng-container [ngSwitch]="day">
<div *ngSwitchCase="'MONDAY'">
Keep calm and pretend it's not Monday.
</div>
...
<div *ngSwitchCase="'FRIDAY'">
Happy Friday!
</div>
</ng-container>