Is there a logical not for handlebars bindings with Ember.js?
Suppose I have a ember view that I want to bind to a value
{{Ember.Button disabledBinding="view.controller.some_value"}}
I only want the button to be disabled if some_value
is false
. The code above makes it disabled if some_value
is true
.
One approach to fixing this would be to have a complementary computed value on the controller. excuse my coffeescript
opposite_some_value: (->
if @get('some_value') == true
return false
else
return true
).property 'some_value'
But this seems clunky.