I am trying to store my auto generated id into the documents field as.
var act = this.afs.collection("activities").add({
activityId = act.id,
})
.then(function(docRef) {
console.log("Document written with ID: ", docRef.id);
})
.catch(function(error) {
console.error("Error adding document: ", error);
});
but in the console there is an error occur. I am sure I am using wrong approach. Please help me how can I access auto id of my document? Any help will be appreciated.