Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(firestore): allow collection and doc from ref #1487

Merged
merged 1 commit into from
Mar 7, 2018

Conversation

Maistho
Copy link
Contributor

@Maistho Maistho commented Feb 27, 2018

Checklist

Description

Allows firestore collection and doc to be constructed from both references and string paths.

Do I need to add better tests? I was not sure how to get a reference easily, so I just took one from afs, which seems a bit backwards in a way.

Also not sure if there are any required documentation changes. Let me know in that case!

Code sample

Changes the interfaces to:

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

Allows firestore collection and doc to be constructed from both
references and string paths.

Fixes angular#1337
@davideast
Copy link
Member

YES! @Maistho THANK YOU SO MUCH!

Give me a bit and I'll give this a proper review.

@davideast
Copy link
Member

LOOKS PERFECT! Thank you so much @Maistho!

Copy link
Member

@davideast davideast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOVE IT.

@davideast davideast merged commit 136f1e5 into angular:master Mar 7, 2018
@Maistho
Copy link
Contributor Author

Maistho commented Mar 7, 2018

Sweet! ♥️

@Maistho Maistho deleted the issue-1337-firestore-from-ref branch March 7, 2018 13:37
myspivey pushed a commit to myspivey/angularfire2 that referenced this pull request Apr 10, 2018
Allows firestore collection and doc to be constructed from both
references and string paths.

Fixes angular#1337
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants