mardi 24 février 2015

Ember data error: model:@each`, must be of the form `type:name

I have this model, that throws an error when I navigate to this route with this model:



export default DS.Model.extend({
newUser: DS.belongsTo('user'),
password: DS.attr('string')
});


user model:



export default DS.Model.extend({
title: DS.attr('string'),
firstName: DS.attr('string'),
surname: DS.attr('string'),
dateOfBirth: DS.attr('string'),
telephoneNumber: DS.attr('string'),
accountType: DS.belongsTo('accountType'),
emailAddress: DS.attr('string'),

//used to present full-name
fullName: function () {
return this.get('title') + ' ' +
this.get('firstName') + ' ' +
this.get('surname');
}.property("title", "firstName", "surname")

});


error:



model:@each`, must be of the form `type:name




Aucun commentaire:

Enregistrer un commentaire