return this.orderCollection.snapshotChanges().pipe(
map(actions =>
actions.map(a => {
const data = a.payload.doc.data() as Order;
const id = a.payload.doc.id;
return { id, ...data };
})
)
);
}
Now How can I get Document referance Data in angularfire2?
You will need to load the referenced document separately. So something like:
customerRef = a.payload.doc.get("customerId");
customerRef.get().then((doc) => {
console.log(doc.data());
})