Computed Properties
Define new properties using computed properties
'use strict';
polarity.export = PolarityComponent.extend({
fullName: Ember.computed('block.data.details.firstName', 'block.data.details.lastName',
function(){
return `${this.get('block.data.details.firstName')}
${this.get('block.data.details.lastName')}`;
})
});<div>
fullName: {{fullName}}
</div>'use strict';
polarity.export = PolarityComponent.extend({
fullName: Ember.computed('block.data.details.firstName', 'block.data.details.lastName',
function(){
return `${this.get('block.data.details.firstName')}
${this.get('block.data.details.lastName')}`;
}),
fullNameLower: Ember.computed('fullName', function(){
return this.get('fullName').toLowerCase();
})
});Last updated