Closed danmalone89 closed 6 years ago
It should as the firebase service is the firebase API itself
Perfect. Thanks.
@rmmmp Any chance you could help me understand why I'm receiving this.get(...).functions is not a function
when specifying the model in my route?
/routes/contact.js
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service'
import RSVP from 'rsvp';
export default Route.extend({
session: service('session'),
firebase: service('firebase'),
beforeModel: function() {
return this.get('session').fetch().catch(function () {});
},
model(params) {
return RSVP.hash({
contactRecord:
this.get('firebase').functions().httpsCallable('contactRecord')({contactId: params.contact_id})
.then(recordResponse => {
return recordResponse;
})
});
},
setupController(controller, models) {
controller.set('contactRecord', models.recordResponse);
controller.set('UDFRecord', models.UDFResponse);
}
});
Have you imported firebase-function as described in https://github.com/rmmmp/ember-firebase-service/blob/master/README.md#configuration?
Turns out my firebase module didn't include firebase-functions.js
because it was relying on an older version of firebase. Updated it, now I've got a build error because of conflicting versions of firebase! Womp womp.
+-- emberfire@2.0.10
| `-- firebase@3.9.0
`-- firebase@5.1.0
``
Yeah sadly there's nothing I can do about that if you're using emberfire. You'll have to wait for it to catch up to Firebase 5.x.
Does this support
firebase.functions().onCall
? I'd like to use this call a Firebase Function from my route to retrieve some data but I'm unable to find any cases where anyone has accomplished this Ember. Thanks!https://firebase.google.com/docs/functions/callable