I have a list of chats, and I like to change the color of ion-icon depending on the status of a chat(from attribute chat.status):
<ion-list *ngFor = "let chat of chats">
<ion-item>
<ion-icon name="ellipse-outline" slot ="end" color ="primary"></ion-icon>
<ion-label>
<h2> {{chat.username}} </h2>
</ion-label>
</ion-item>
</ion-list>
The icon color should be red when chat.status is A and green when chat.status is B. How can I do this?
Thanks a lot