0
Well, I’m trying to develop an app with Ionic 3 and Firebase. But I’m having problems. You are bringing all the orders, for all users (getAll). I wanted to know the correct way for me to bring only the user requests themselves;
getAll() {
return this.db.list('pedidos', ref => ref.orderByChild('name'))
.snapshotChanges()
.map(changes => {
return changes.map(c => ({ key: c.payload.key, ...c.payload.val() }));
})
}
Tell us which Firebase product you’re using (example: Realtime Database) and an example of how your data is organized.
– Renata
Realtime Database
– user125721
{ "requests" { "-Lmmaryymarcdemmdpjm" { "name" "Product1", "tel" : "1234" }, "-Lmmawnotnq8gnk9uww5" : { "name" "Product2", "tel" "321" } } ;}
– user125721