<ion-item item-stable (click)="toggleGroup(item); gatherMainContent(item)"
[ngClass]="{active :isGroupShown(item)}">
<ion-icon [ngClass]="isGroupShown(item) ? 'add' : 'remove'"></ion-icon>
{{item.name}}
</ion-item>
I have multi level accordion menu and i want to show add icon or remove icon depending if they have sub values or not. The function above isGroupShown(item) returns true or false depending the situation. I could not figure out how to change ion-icon name attribute depending the return of the function.