I'm trying figure out how my computed property identify if my relationship was set.
author: BelongsTo('author'),
hasAuthor: Ember.computed.bool('author')
I need change my css based if has a author.
//---------- my-component.js
export default Ember.Component.extend({
classNameBindings: ['hasAuthor'],
hasAuthor = Ember.computed( () => get('post').get('hasAuthor') )
});
Aucun commentaire:
Enregistrer un commentaire