Pregunta

When trying to lookup a model using the EmberFire firebase adapter I get undefined and an error as a result: Error while loading route: undefined. I have also tried creating models but can't seem to persist them so maybe I have something incorrectly configured.

App = Ember.Application.create();

App.ApplicationAdapter = DS.FirebaseAdapter.extend({
  firebase: new Firebase('https://emberfire-test.firebaseio.com')
});

App.Post = DS.Model.extend();

App.IndexRoute = Ember.Route.extend({
  model: function() {
    return this.store.find('post');
  }
});

jsBin here: http://emberjs.jsbin.com/kuyujohi/14/edit?js

¿Fue útil?

Solución

The problem was with the emberFire not handing empty / non-existent collections. This has now been fixed in the emberFire repo.

Github issue: https://github.com/firebase/emberFire/issues/39

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top