Skip to content

Commit c2df603

Browse files
authored
docs(firestore): Update add example to use set (#1539)
1 parent 51ab732 commit c2df603

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/firestore/collections.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export class AppComponent {
117117
// Persist a document id
118118
const id = this.afs.createId();
119119
const item: Item = { id, name };
120-
this.itemsCollection.add(item);
120+
this.itemsCollection.doc(id).set(item);
121121
}
122122
}
123123
```

0 commit comments

Comments
 (0)