angular ng-class里面可以用 {{}} 取值吗
业精于勤,荒于嬉;行成于思,毁于随。
Thanks for the invitation, for all uses of ng-class, you can view the-many-ways-to-use-ngclass
Data
$scope.users = [ { id: 1, name: `Lolo`, icon: true }, { id: 2, name: 'Semlinker', icon: false }];
HTML Template
<ul> <li ng-repeat="user in users" ng-class="{'tab': user.icon}"> {{user.id}} - {{user.name}} </li> </ul>
Thanks for the invitation, for all uses of ng-class, you can view the-many-ways-to-use-ngclass
Data
HTML Template