Utiliser la condition booléenne ngclass
[ngClass]="{'class1': condition==true, 'class2': condition==false}"
MitchAloha
[ngClass]="{'class1': condition==true, 'class2': condition==false}"