1
votes

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

1

1 Answers

1
votes

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