I'm testing ember-1.13.0-beta.1 on on an application and can't find a way to provide default values for attributes. I was previously using properties with default values:
export default Ember.Component.extend({
myAttribute: 'default-value',
});
{{my-component myAttribute=otherValue}}
I tried this:
export default Ember.Component.extend({
attrs:{
myAttribute: 'default-value',
},
});
<my-component myAttribute={{otherValue}} />
but it doesn't work. Did I miss something?
Aucun commentaire:
Enregistrer un commentaire