In Ember.js documentation it states that you can bind attributes to a Boolean value. However when I try to use either of the below and the value is false it does not apply the provided class names.
<div {{bindAttr class="isEnabled:enabled:disabled"}}>
Warning!
</div>
<div {{bindAttr class="isEnabled::disabled"}}>
Warning!
</div>
Is this functionality no longer available?
The functionality is still working, and is not deprecated.
If you can’t make it work, I guess its because you guess
isEnabledis a property of the view, but the view rendering context has changed, so you have to write:I suggest you to read the View context changes gist.
The code:
The template:
And the JSFiddle is here.