I'm inserting a new document into my firestore collection like so:
this.afs.collection<Client>('clients').add(this.form.value).then(docRef => {
console.log("Need to output the firestore generated doc id of the document here: ...")
})
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…