lundi 22 janvier 2018

how to set ng-class with multiple condition

I have to set color based on coming details from angular list.

In below code coming data is in string so I have set condition with string

CODE:

<td ng-class="{IsGreen: s.InformationForm == 'Form Completed'  || IsMaroon: s.InformationForm == 'Fill Form'}">
<a href="javascript:void(0);" ng-if="s.InformationForm == 'Form Completed'" class="IsColorWhite"></a>
<a href="javascript:void(0);" ng-if="s.InformationForm == 'Fill Form'" class="IsColorWhite"></a></td>

Above is code I have done but not working any suggesion on this or any mistake I have done kindly comment.

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire