📜  获取 doc id firestore - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:07.708000             🧑  作者: Mango

代码示例4
const racesCollection: AngularFirestoreCollection;
return racesCollection.snapshotChanges().map(actions => {       
  return actions.map(a => {
    const data = a.payload.doc.data() as Race;
    data.id = a.payload.doc.id;
    return data;
  });
});