arrow_back Back to Notebook
angular/firebase
angular/firebase
March 20, 2019

How query the Firebase Firestore in Angular

To query the firebase firestore in angular you can do the following

First import the firestore

import { AngularFirestore, DocumentChangeAction } from '@angular/fire/firestore';

Constructor

constructor(
        db: AngularFirestore // inject the firestore
    ) {
        db
            .collection('some-collection/') // reference the collection
            .snapshotChanges()
            .subscribe((myDocuments) => console.log(myDocuments.payload.doc.data()));
    }

Thanks for reading!

John Wiseman

Full-Stack Software Engineer building scalable digital solutions. specializing in modern web technologies and mission-critical systems.

© 2026 Wiseman Systems Pty. Ltd.

Navigation

Start a Conversation

Ready to discuss your next project? Let's build something extraordinary together.

Get in Touch