Ion-select: dynamically change function in ionChange event

Hi Good Day, Is there a way to dynamically change function in ionChange event?
I tried this:
<ion-select (ionChange)=“test.event” // No error but did’nt work
<ion-select (ionChange)="{{test.event}}" // Shows error
<ion-select [(ionChange)]=“test.event” // Shows error
<ion-select {{ test.event }} // Shows error
<ion-select test.event // Shows error

Thanks.

What I would do is put the conditional logic inside the event handler, instead of in the template. That way the template always sees a single entry point and you don’t have to worry about this.

2 Likes

Thank you.I will do it.

HTML
<ion-select formControlName=“vgroup” (ionChange)=“onSelectChange($event)”>

.ts file
onSelectChange(selectedValue: any)
{
alert(selectedValue);
}

2 Likes