您的位置:首页 > Web前端 > AngularJS

angular style, class

2013-09-29 14:18 363 查看
ng-class accepts an "expression" that must evaluate to one of the following:


a string of space-delimited class names

an array of class names

a map/object of class names to boolean values

<divng-repeat="item in items"ng-class="{'pending-delete': item.checked}">
... HTML to display the item ...
<inputtype="checkbox"ng-model="item.checked"></div>


[/code]
<divclass="main-body"ng-style="{color: myColor}">
...
<inputtype="text"ng-model="myColor"placeholder="enter a color name">
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: