Ionic onchange not working for me

  <ion-item>
              <ion-label floating>Username</ion-label>
              <ion-input formControlName = "userName" type="text" (ionChange) = "change()"></ion-input>
            </ion-item>
change(){
   console.log("welcome");
 }```

Should work when you enter text in input.

it’s not working…

first of all remove spaces
add name attribute

<ion-input formControlName="userName" type="text" (ionChange)="change()" name="userName"></ion-input>

it’s working fine now thank you

1 Like

Don’t forgot to checked answer as solution.
Thanks