例如:

td(ng-class="{0:'text-warning',1:'text-primary'}[bj.flag]") {{bj.flag | bjFlagfilter}}

当bj.flag的值为0时字体颜色为:text-warning

当bj.flag的值为1时字体颜色为:text-primary

05-11 16:23