lundi 2 septembre 2019

Connecting firebase from ember gets firebase.app is not a function getApp

I am working in an Ember.js app and currently trying to connect to firebase (is not my default adapter, the default is a Rest adapter). I followed the instructions given in https://github.com/firebase/emberfire but when I try to read data from the database I get:

Error while processing route: my.routingFile firebase.app is not a function getApp

In brief, this is my routing file:

import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
import RouteMixin from 'ember-cli-pagination/remote/route-mixin';
import Ember from 'ember';
import RealtimeRouteMixin from 'emberfire/mixins/realtime-route';

export default Ember.Route.extend(AuthenticatedRouteMixin,RouteMixin, RealtimeRouteMixin, {

    firebaseApp: Ember.inject.service(),
    model(params) {
      return this.store.findAll('myModel');
    },

    setupController(){
      this._super(...arguments);
    },

    actions:{
    }
});

And, my adapter is defined as follows:

import RealtimeDatabaseAdapter from 'emberfire/adapters/realtime-database';

export default RealtimeDatabaseAdapter.extend({
  databaseURL: 'https://my-url.firebaseio.com/'
});

My ember-cli version is: 3.0.2

Then, what am I missing?




Aucun commentaire:

Enregistrer un commentaire