Seach a register automatically without clicks


#1

Hi
Currently i have a button where the user can search a register , but i want to do it automatically
, i have tried with (change) but it does not working

My frontend


<button ion-button full icon-left (click)=“scan()”>Escanear codigo




<div *ngIf=“scannedData.text” align=“center”>
		<ion-input type="text" value="{{ scannedData.text }}" [(ngModel)]="resultado" (change)="ionViewDidLoad()"></ion-input>
	</div>
</div>

My TS file
ionViewDidLoad() {
try{
var referenceresultado= this.resultadoref.orderByChild(‘Producto’).equalTo(this.resultado);
referenceresultado.on(‘value’, itemSnapshot => {
this.products = [];
itemSnapshot.forEach( itemSnap => {
this.products.push(itemSnap.val());

 let alert = this.alertCtrl.create({
title: 'Producto encontrado! :D',

});
alert.present();

  return false;
});

});

}catch(Error){

}

}