Search code examples
angulargoogle-cloud-firestoreangularfire2

Is it possible to create a top-level collections in Firestore with angularfire2?


Reading the Angularfire GitHub page on collections doesn't reveal much about my how to create a top-level collection.

Is it possible to create a top-level collection through the SDK?


Solution

  • Collections are created automatically when you write a document to them. This applies equally to top-level collections or nested collections.

    So if you follow the instructions in adding documentation to a collection, you'll be creating a collection.