The Firebase team is launching a brand new a fully-managed NoSQL document database: Cloud Firestore, and we’re happy to announce full support in AngularFire.

Cloud Firestore provides powerful querying, offline enabled SDKs, realtime data synchronization, and all at global scale. Read more about today’s beta launch on the Firebase blog.

AngularFire, meet Cloud Firestore

AngularFire is the official Angular library for Firebase. AngularFire combines the power of Angular, Firebase, and RxJS to act as your serverless backend. It includes modules for the Realtime Database, Firebase Authentication, and now we’ve added Cloud Firestore to that list.

The AngularFirestore module provides observable streams from Cloud Firestore that are easy to integrate with Angular. These can be used in Animations, Forms, the Router, and more.

Adding AngularFire and AngularFirestore to your project is easy. Install Firebase and AngularFire from npm:

npm i firebase angularfire2

Then add it to your NgModule:

In your component you can use the AngularFirestore service to create realtime observable streams of data.

The .valueChanges() method returns a synchronized array of JSON objects. Whenever local or remote data changes the template updates automatically.

Collections and Documents

The Firebase Realtime Database is a JSON data store. Reading data at a path brought back the entire tree below. This lead to a best practice of flattening your data. Cloud Firestore improves on this structuring.