Firestore Getting documents id from collection

后端 未结 9 1159
陌清茗
陌清茗 2020-11-30 00:16

I\'m trying to retrieve my documents with id but can\'t figure it out.
Currently I retrieve my documents like this :

const racesCollection: AngularFir         


        
9条回答
  •  借酒劲吻你
    2020-11-30 01:11

    doc.id gets the UID.

    Combine with the rest of the data for one object like so:

    Object.assign({ uid: doc.id }, doc.data())

提交回复
热议问题