1. 8
    Add a New Document to a Collection in Firestore from Angular with Firestore addDoc
    4m 3s

Add a New Document to a Collection in Firestore from Angular with Firestore addDoc

InstructorJorge Vergara

Share this video with your friends

Send Tweet

We have a new task form but currently it doesn't do anything. In this lesson we'll implement the save button that will add the task to Firebase.

First, we'll create a reference to our tasks collection in Firestore, and then push a new document to that collection with the addDoc function Firestore provides us.

After the document is in the database, we'll use the updateDoc function to edit that document and add the document's ID as a property on the document.