angular 7 class conditional code example Example: conditional classes angular <div [className]="isActive ? 'active' : 'inactive'"> </div>