Switch case in angular is a combination of 3 directives
1. ngSwitch directive
2. ngSwitchCase directive
3. ngSwitchDefault directive
If we have display some Text Value for some key value then we can use this syntax. It is similar to C# switch statement.
Syntax for using Switch in Angular is like this
<div class="col-xs-6" [ngSwitch]="employee.department"> : <span *ngSwitchCase="1"> Help Desk </span> <span *ngSwitchCase="2"> HR </span> <span *ngSwitchCase="3"> IT </span> <span *ngSwitchCase="4"> Payroll </span> <span *ngSwitchDefault> N/A </span> </div>