0

I have a property bound in my handlebar template

{{view Ember.Checkbox checkedBinding="state"}}  

I would like the checked state of the checkbox to be the opposite of what the bound value is. Can I do this with the view like that or do I need to use a computed property? I'm trying to avoid computed because the checkbox is on a table inside of an each with a complicated object.

<input type="checkbox" {{bindAttr checked="state"}}  {{action "flipMyCheck"}} />

I am hoping stack overflow can help before I just go old school jQuery.each() on it.

4

1 回答 1

0

不确定我是否理解你的问题。这能解决你的问题吗?

http://jsfiddle.net/Sly7/JDRFW/

于 2012-06-20T22:34:40.977 回答