Add Switch Case in Angular 13 Component Class TS file

When you have a number of conditional expressions to evaluate, then you can use the IF-ELSE or Switch case statements. Adding a Switch case make the code more readable and easy to maintain. For this reason, most of the developers use Switch over IF-ELSE to make their code look compact and more graceful.