How to change the name of ion-icon item depending the [ngClass]

<ion-item item-stable (click)="toggleGroup(item); gatherMainContent(item)"  
[ngClass]="{active :isGroupShown(item)}">
            <ion-icon  [ngClass]="isGroupShown(item) ? 'add' : 'remove'"></ion-icon>

            &nbsp; {{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.

You can bind the [name] attribute like any other.