我在循环中有这个列表,在Ionic框架中
<ion-list ng-repeat = "item in ritiri.rows |filter: {'entry_by' : currentuserID}" can-frag="false">
<ion-item class="item-remove-animate item-icon-right" ng-click="ritiriview(item.id_ritiro);">
<h2>{{item.numero_spedizione}}</h2>
<p>{{item.rag_soc_mitt}}</p>
<p>{{item.indirizzo_mitt}}</p>
<p>{{item.localita_mitt}}</p>
<i class="icon ion-arrow-right-b"></i>
<ion-reorder-button class="ion-drag" on-reorder="move(note, $fromIndex, $toIndex)"></ion-reorder-button>
<ion-option-button class="button-balanced icon-left ion-happy-outline" ng-click="ritirieff(item.id_ritiro)"> Effettua</ion-option-button>
<ion-option-button class="button-assertive icon-left ion-trash-b" ng-click="mancatiritiri(item.id_ritiro)"> Rifiuta</ion-option-button>
</ion-item>
</ion-list>
如果item.id_stato == 13或14或15,我需要更改每个列出项目的div的颜色。 我怎么能做到这一点?
答案 0 :(得分:3)
您可以尝试使用ng-class
上的条件:
<强> HTML 强>
<div ng-class="{'colored': item.id_stato == 13 || item.id_stato == 14 || item.id_stato == 15}">
<强> CSS 强>
.colored {
background: color-value;
}
答案 1 :(得分:0)
@ApiMethod(path = "myPath/{tokenId}/doSomething", httpMethod = "get")
public ResponseMessage ReturnSomething(@Named("tokenId") String tokenId, User user)