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 中获取文档参考数据?
1 回答
犯罪嫌疑人X
TA贡献2080条经验 获得超4个赞
您将需要单独加载引用的文档。所以像:
customerRef = a.payload.doc.get("customerId");
customerRef.get().then((doc) => {
console.log(doc.data());
})
添加回答
举报
0/150
提交
取消