2014-10-16 30 views
0

是否有可能添加CSS類「標記行」爲TR-元素的情況下,如果candidate.bl = TRUE?角度:如何以紀念表所需行

 <tbody> 
     <tr data-ng-repeat="candidate in candidates | orderBy : orderByField : reverseSort"> 
      <td>{{candidate.fullname}}</td> 
      <td>{{candidate.birthdate}}</td> 
      <td><span ng-show="candidate.bl" class="glyphicon glyphicon-ok"></span></td> 
     </tr> 
    </tbody> 

回答

0
<tr ng-class="{'marked-row':candidate.marked}" data-ng-repeat="candidate in candidates | orderBy : orderByField : reverseSort"> 
     <td>{{candidate.fullname}}</td> 
     <td>{{candidate.birthdate}}</td> 
     <td><span ng-show="candidate.bl" class="glyphicon glyphicon-ok"></span></td> 
    </tr>