javascript - Ember 1.0.0 input type radio 'checked' binding not updated when property changes -
i've got problem: i've got property called 'active' on 1 of models, either string 'yes' or 'no', want use property check html radio button.
so when 'active' 'yes' should checked otherwise should not checked. i've got work, when make action sets 'active' property 'no' or 'yes' radio buttons checked status doesn't update.
here's bin: http://emberjs.jsbin.com/ohasezo/3/edit.
when using checkbox same results: http://emberjs.jsbin.com/owiluru/3/edit
i can't make sense of it, think should work, ideas?
{{bind-attr}}
doesn't work way - binds 1 way. here examples of how you'd go this:
use {{view ember.checkbox checkedbinding="car.active"}}
: jsbin example
or use custom implementation of ember.radiobutton
- {{view ember.radiobutton checkedbinding="car.active"}}
: jsfiddle example
credit ember.radiobutton
: thoughts & ramblings of software developer.
edit: updated link per steve h.'s comment - thanks!
Comments
Post a Comment