gdg-tangier / vue-firestore

:cloud: Cloud Firestore binding in realtime with Vuejs
MIT License
235 stars 28 forks source link

Adding to a collection if I've bound it dynamically #7

Closed stuartlangridge closed 6 years ago

stuartlangridge commented 6 years ago

I'm using this.$binding to bind my collection manually, which is great. However, if I do that, then how do I add documents to my firestore? I can't just use this.$firestore.(collectionname).add because that was never created, so I don't have a reference to the collection that I can use to add to it...?

stuartlangridge commented 6 years ago

(Ah, I don't use this.$firestore for that; I can just use the globally created firestore object as firestore.collection("whatever").add({...}), exactly the same as I do when binding. I'll close this.)