Hey,
I am not sure if components currently (or will) allow this.
I want to wrap a field access (from within a component template), within a computed property. The same as computed properties on controllers.
Say the field is ‘name’, and the computed property is nameOrPlaceHolder
so in the component javascript:
App.Blah-BlahComponent = Ember.Component.extend({
nameOrPlaceHolder: function() { return this.get('name') }.property('name')
})
in the template:
{{nameOrPlaceHolder}}
Should this work?
I will put up a jsbin soon to illustrate more clearly…