Ember app, using Ember CLI, ember-data and http-mock. I can't seem to connect to the store from the clubs/index route.
This seems to be the offending code. If I remove the call to the store, and include an inline model everything works fine. Nop idea why it can't find the store.
// clubs/index.js
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return this.store.find('club');
}
});
The http-mock works just fine when I curl it:
curl -H "ContentType:application/json" http://localhost:4200/api/clubs
Everything else is pretty standard:
// router.js
import Ember from 'ember';
import config from './config/environment';
var Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function() {
this.resource('clubs', function() {
});
});
export default Router;
// club.js
import DS from 'ember-data';
export default DS.Model.extend({
name: DS.attr('string')
});
Any help much appreciated!