Ash4207
Ash4207
... addDoc(collection(this.firestore, 'travels'), travelData).then((travelRef) => { collection(this.firestore, `travels/${travelRef.id}/stops`); setDoc(travelRef, {... travelData, id: travelRef.id}) this.router.navigate(['edit', `${travelRef.id}`]); return travelRef; ```
... addDoc(collection(this.firestore, 'travels'), travelData).then((travelRef) => { collection(this.firestore, `travels/${travelRef.id}/stops`); setDoc(travelRef, {... travelData, id: travelRef.id}) this.router.navigate(['edit', `${travelRef.id}`]); return travelRef; }) }cloud-functions-angular-start/.angular-cli.jsonasync updateData(path: string, data: Partial) { await updateDoc(doc(this.firestore, path), data) } async...