angular style, class

ng-class accepts an "expression" that must evaluate to one of the following:
  1. a string of space-delimited class names
  2. an array of class names
  3. a map/object of class names to boolean values


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


<divclass="main-body"ng-style="{color: myColor}">
   ...
   <inputtype="text"ng-model="myColor"placeholder="enter a color name">
原文地址:https://www.cnblogs.com/lindsayzhao103011/p/3345647.html