add class based on condition angular 5 code example
Example 1: conditional classes angular
<div
[className]="isActive ? 'active' : 'inactive'">
</div>
Example 2: Angular 8 ngClass If
[ngClass]="{1:'my-class1',2:'my-class2',3:'my-class4'}[step]"