I'm having an issue with embers bind-attr on the 'disabled' attribute on a button. Basically I can't get it to not disable my button.
isCancelled is a boolean in my model, according to this it should make 'disabled' appear and disappear inside the rendered tag.
Button looks like:
<button {{action "cancel" provisioning}} {{bind-attr disabled="isCancelled"}}>
It always renders the 'disabled' attribute.
I made a simple check to debug it. It looks like this:
isCancelled: {{isCancelled}}
It renders like: isCancelled: false
I'm using Ember 1.12.0
The bind-attr syntax is deprecated:
<button {{action "cancel" provisioning}} disabled={{isCancelled}}>
And in your case you are passing a string not the isCancelled
property therefore it is always true, {{bind-attr disabled=isCancelled}}>
would work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With