I have a solution for the regular HTML checkbox input. Use the "checked" 
attribute:

<input type="checkbox" checked="{{isThisReal}}">

Demo: http://jsfiddle.net/warpech/Wbk67/3/

But I still don't know how to achieve the same with polymer-ui-toggle-button


On Tuesday, February 25, 2014 11:27:17 AM UTC+1, Marcin Warpechowski wrote:
>
> I have problem binding polymer-ui-toggle-button to a boolean value and it 
> looks like a bug to me. The toggle receives the initial value from my model 
> but does not update the model after a change. Also, two toggles don't 
> reflect each other changes. Any ideas?
>
> <polymer-ui-toggle-button 
> value="{{isThisFantasy}}"></polymer-ui-toggle-button>
> t2.model = {
>     isThisFantasy: true
> };
>
> See the fiddle: http://jsfiddle.net/warpech/Wbk67/
>
> The above fiddle also tries binding to a regular HTML checkbox input. It 
> fails, probably because value gets converted to string. Is there a way to 
> bind a boolean to a checkbox input?
>
> br
> Marcin
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/a4364ce2-3183-44dd-abb5-f36e71adf22a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to