ember.js version: 2.18.0
model:
export default DS.Model.extend({
name: DS.attr('string'),
description: DS.attr('string'),
songs: DS.hasMany('song')
})
controller:
export default Controller.extend({
sortBy: ['name:asc', 'description:asc'],
sortedBands: computed.sort('model', 'sortBy')
}
ember gave me the following error:
Only string, number, symbol, boolean, null, undefined, and function are allowed as default properties ember/avoid-leaking-state-in-ember-objects
Aucun commentaire:
Enregistrer un commentaire