Replies: 4 comments 1 reply
-
There's a comment on that on #2267 |
Beta Was this translation helpful? Give feedback.
-
I have a bit of a workaround for this that can be used until the withConverter as added as an extension to the normal API. The AngularFirestore.collection method accepts a CollectionReference as well as a string. So, you can first create a CollectionReference complete with the converter applied using the plain old firestore library and then provide that reference to the collection method.
My converter (injected as "converter") then implements the FirestoreDataConverter interface. Works without any issues. |
Beta Was this translation helpful? Give feedback.
-
worked for me, thank you ! |
Beta Was this translation helpful? Give feedback.
-
While @IainAdamsLabs is correct I'd like to point out that using |
Beta Was this translation helpful? Give feedback.
-
Since v7.6.0, the
CollectionReference
for Firestore in firebase-js-sdk has supported awithConverter
method that allows the specification of a converter object that will automatically mapDocumentData
from firestore into application types. I would like to use this feature as I would allow me to write some more generic APIs for data access with firebase. Unfortunately, the current version of angularfire does not support it forAngularFirestoreCollection
Is there any plan to support this feature in angularfire? I was thinking about submitting a simple PR but didn't know if this would be possible due to the current firebase js sdk dependencies.
Beta Was this translation helpful? Give feedback.
All reactions