I'd like to save the id of my document as a property as well, not only as a reference on the collection. At the moment I save it like this:
const newSet: AngularFirestoreDocument<SetModel> = this.AngularFirestore.doc('users/' + this.navParams.data.userId);
// adding user to our ddbb
newSet.collection('sets').add(this.set)
.then(function (docRef) {
// ok
})
.catch(function (error) {
// error
});
Would be that possible? Or do I need to save it, get the id and update it again?