(ionInput) dosen't work on --prod build


I have a simple searchbar. (ionInput) works great in both android and web in debug build .
but the event never triggers in --prod build on both platforms.
Even a simple console.log() doesn’t work.


<ion-searchbar [(ngModel)]=“cher” placeholder=“Search” (ionInput)=“log()” >


log() { console.log(“why”) }

(I have the latest version in everything in my package.json )
ionic-angular": “3.9.2
angular”: “5.1.2”


It’s a bit odd to have both double-bound ngModel and ionInput. Maybe they are competing. I’ve successfully listened to formControl.valueChanges() in production builds. So you have [formControl]=“nameOfFormControl”. You listen to the formControl Observable with a debounce.

nameOfFormControl: FormControl = new FormControl();
this.textFilter = this.nameOfFormControl.valueChanges.debounceTime(250)

This has the added advantage of not using ngModel.


fixed my issue by installing: npm install @ionic/app-scripts@3.1.7 --save-dev --save-exact .

source : https://github.com/ionic-team/ionic/issues/13718