I'm trying to set up data binding for a component attr, and when I do so my property is returning the a string. I have a custom component class:
App.EditableTextComponent = Ember.Component.extend({
attributeBindings: ['contenteditable'],
isEditable: true
});
And, my handlebar template:
<span class="editable-text" {{bind-attr contenteditable=isEditable}}>{{content}}</span>
Whenever I render this template, if isEditable is true, it will render: contenteditable="contenteditable"
rather than contenteditable
like shown in the example here http://emberjs.com/guides/templates/binding-element-attributes/.
I can get this example to work if I set my isEditable property to a string of "true", but this doesn't seem right, as it should be a boolean for use in other places. How do I get this data binding to work without setting the property to a string?