<section [ngClass]="{'class1':condition1, 'class2': condition2, 'class3':condition3}" >
<!-- notice expression1 used twice -->
<div ng-class="{class1 : expression1, class2 : expression1}">
Hello World!
</div>
[ngClass]="[ mainIMG.touched && !mainIMG.valid?
'class1 class2':
'class3 class2' ]"
<div ng-class="{class1 : expression1, class2 : expression2}">
Hello World!
</div>