I have this, what should be simple, problem in Ember.js. Based on a boolean property, I want to choose whether or not to set a data attribute. This works perfect for class attributes and I can set the data attribute with a property (so in this example {{bind-attr data-toggle="label"}} works).
<a href="#" {{bind-attr class="hasContent:dropdown-toggle"}} {{bind-attr data-toggle="hasContent:dropdown"}}>
{{label}}
{{#if hasContent}}<b class="caret"></b>{{/if}}
</a>
What's the fastest/cleanest solution for this? The object in my template is just a Ember.object. I'm using Ember 1.5 & Handlebars : 1.2.1