ng-class ternary less than code example Example: ng class ternary <div [ngClass]="varA === varB ? 'css-class-1' : 'css-class-2'">