I'm playing with the fixture adapter in Ember.js.
This:
let cars = DS.Model.extend({
make: attr('string'),
model: attr('string'),
year: attr('string'),
FIXTURES: [
{
id: 1,
model: 'foo',
make: 'bar',
year: '2001'
}
]
});
Throws "unable to find fixtures"
Whereas this:
let cars = DS.Model.extend({
make: attr('string'),
model: attr('string'),
year: attr('string'),
});
cars.reopenClass({
FIXTURES: [
{
id: 1,
model: 'foo',
make: 'bar',
year: '2001'
}
]
});
Works great. I would expect them to be the same, though, what's the difference?
Aucun commentaire:
Enregistrer un commentaire