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 };
})
)
);
}
现在如何在angularfire2中获取文档参考数据?
答案 0 :(得分:0)
您将需要单独加载参考文档。像这样:
customerRef = a.payload.doc.get("customerId");
customerRef.get().then((doc) => {
console.log(doc.data());
})