Bring information from Firebase to a Searchbar - Ionic

0
Well, I'm developing an app with ionic 3 and firebase ... What I'm trying to do, would be basically to bring data from firebase (Real Time), and play inside a vector, and then check with Searchbar. But I'm having problems ... I can bring the data, but it fails in the search bar because it does not compare what is being typed on the screen with the vector element.

  buscarUsuario(ev: any) {

  this.provider.buscarCliente().subscribe((cliente: Array<any>) => {
    this.clientes = cliente;
    let val = ev.target.value;
    if(val == this.clientes){ 
    val = this.clientes

  }
})

}

 getItems(ev: any) {


const val = ev.target.value;
if (val == '') {
  this.clientes = null;
} else if(val  && val.trim() != ''){  
  this.buscarUsuario(ev);

}
    
asked by anonymous 08.10.2018 / 14:52

0 answers