标签:scope ng-class angularjs
function Ctr($scope) { $scope.isActive = true; }
<div ng-class="{true: ‘active‘, false: ‘inactive‘}[isActive]"> </div>
ng-class的使用
原文地址:http://blog.csdn.net/yy1300326388/article/details/44453939