Well, I'm developing an app with ionic 3 and firebase. I am having problems in listing existing data in firestore. I have a search bar, which, as it is being typed in it, will display the data below. I already have this implementation done, but it works with data coming from RealTime. But I need to fit it to work the same way, but with the firestore. Here is the code:
var userId = firebase.auth().currentUser.uid
this.clientesRef = firebase.database().ref(userId); // traz apenas os nós de cliente
this.clientesRef.on('value', clientesList => {
clientesList.forEach(element => {
this.cli.push(element.val());
return false;
});
});
How can I fine-tune this code, with data coming from the firestore?