Share Share on Facebook Share on Twitter Pinterest Email <div [ngSwitch]=”color”> <div *ngSwitchCase = “‘red'”> Red</div> <div *ngSwitchCase = “‘Blue'”> Blue</div> <div *ngSwitchCase = “‘Black'”> Black</div> <div *ngSwitchDefault>This is Default </div> </div> 0 Siddharth Shukla Website Related Posts Ways to fix “-bash: ng: command not found” April 22, 2021 How to use *ngIf else in Angular? August 15, 2018 Write A Comment Cancel Reply Save my name, email, and website in this browser for the next time I comment.