1. 20
    Query and Filter Documents from Firestore by userId with query()
    2m 51s

Query and Filter Documents from Firestore by userId with query()

InstructorJorge Vergara

Share this video with your friends

Send Tweet

Now that tasks are actually associated with a user in our database, we want to only show a user their own tasks.

To do this we'll revisit our task list and make some changes to use the query() and where() methods to filter our list before we get it from the database.

We'll learn how to pass our user's ID to a query and fetch only the tasks that belong to that user. Because Firebase uses Observables, you'll also see how we handle and change observables in Angular.