I am setting up a new application with the Ember CLI and Rails backend after this tutorial , but when I set up the route for one of my models, I get the following error:
Error while processing route: inks.index Invalid fullName: `model:@each`, must be of the form `type:name` TypeError: Invalid fullName: `model:@each`, must be of the form `type:name` at __exports__.default.EmberObject.extend.resolve (http://localhost:4200/assets/vendor.js:16772:17) at Object.resolve [as resolver] (http://localhost:4200/assets/vendor.js:16394:25) at resolve (http://localhost:4200/assets/vendor.js:14930:32) at Object.Container.resolve (http://localhost:4200/assets/vendor.js:14510:16) at factoryFor (http://localhost:4200/assets/vendor.js:15013:31) at Object.Container.lookupFactory (http://localhost:4200/assets/vendor.js:14617:16) at Ember.Object.extend.modelFactoryFor (http://localhost:4200/assets/vendor.js:74810:31) at JSONSerializer.extend.extractArray (http://localhost:4200/assets/vendor.js:67710:22) at apply (http://localhost:4200/assets/vendor.js:32851:27) at superWrapper (http://localhost:4200/assets/vendor.js:32419:15)
I searched googled, but I have no idea what that means. I checked to make sure that I have ActiveModelAdapter and Serializer. The model is not complicated:
My route app/routes/users/index.js :
import Ember from 'ember'; export default Ember.Route.extend({ model: function() { return this.store.find('user'); } });
app/router.js :
import Ember from 'ember'; import config from './config/environment'; var Router = Ember.Router.extend({ location: config.locationType }); Router.map(function() { this.resource('users'); }); export default Router;
and my app/adapters/application.js :
import DS from 'ember-data'; export default DS.ActiveModelAdapter.extend({ namespace: 'api/v1' });
I'm still pretty new with EmberCLI, so I'm not sure where to look.
source share