为情所困2017-05-15 17:15:35
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>