Ionic onchange not working for me


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

#2

Should work when you enter text in input.


#3

it’s not working…


#4

first of all remove spaces
add name attribute

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

#5

it’s working fine now thank you


#6

Don’t forgot to checked answer as solution.
Thanks