First, I want to use ng-if to check if the string contains others substring "#teamA" or "#teamB" like:
<ion-item ng-if="msg.indexOf("#teamA") > -1" class="teamA">
{{msg}}
</ion-item>
<ion-item ng-if="msg.indexOf("#teamB") > -1" class="teamB">
{{msg}}
</ion-item>
This code is not working. Secondly, I want each {{msg}} to have different assigned class (teamA and teamB). Am I on the right way to do that (if my ng-if works)?