1.
<div ng-class {'selected': isSelected, 'car': isCar}">
当 isSelected = true 则增加selected class,
当isCar=true,则增加car class,
2.
<div ng-class="{true: 'active', false: 'inactive'}[isActive]">
</div>
isActive表达式为true,则 active,否则inactive。
3.
<div class=”{{test}}”></div>