I have my BD in firebase but I want to do a where, as a login ie if I enter the user and the password brings me the corresponding data.
This is my BD in firebase:
An example:
When I send the emailand telefonoto tb01_usuariobring me the corresponding data:
Currently I am doing it only with the ID that is similar to the field telephone, but I need to do it with the two fields that are inside each record, I hope they understand me
verifica_usuario(telefono: string) {
email = email;
telefono = telefono;
let promesa = new Promise((resolve, reject) => {
//this.items = afDB.list('/cuisines');
this.af.list('/tb01_usuario/' + telefono)
.subscribe(data => {
if (data.length === 0) {
//clave no es correcta
resolve(false);
} else {
//clave correcta
this.telefono = telefono;
this.guardar_storage();
resolve(true);
}
});
})
.catch(error => console.log("ERROR en promesa Service: " + JSON.stringify(error)));
return promesa;
}