[Angular] Angular ngSwitch Core Directive In Detail
When want to display different component based on some conditions:
<div class='course-category' [ngSwitch]="course.category">
<div class="category" *ngSwitchCase="'BEGINNER'">Beginner</div>
<div class="category" *ngSwitchCase="'INTERMEDIATE'">Intermediate</div>
<div class="category" *ngSwitchCase="'ADVANCE'">Advance</div>
<div class="category" *ngSwitchDefault="'BEGINNER'">All levels</div>
</div>