Skip to content

Allow Firestore collection and doc to accept a Reference as input #1337

Closed
@Maistho

Description

@Maistho

angularfire2/database allows initialising a object/list using either a path string or a reference. It would be nice to allow the same for the firestore.

The new interface would look something like this:

collection<T>(pathOrRef: string | firebase.firestore.CollectionReference, queryFn?: QueryFn): AngularFirestoreCollection<T>
doc<T>(pathOrRef: string | firebase.firestore.DocumentReference): AngularFirestoreDocument<T>

It should be a simple change, I can make a PR for it if it sounds interesting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions