You'll need to wait to stamp the template until the
<polymer-ui-toggle-button> definition has been registered. Here's your
example, updated:

http://jsfiddle.net/Wbk67/5/

Here's more information:

https://groups.google.com/d/msg/polymer-dev/N5Xq4zAN8Wk/5mL8dF-JXEEJ


On Tue, Feb 25, 2014 at 2:33 AM, Marcin Warpechowski <[email protected]>wrote:

> 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.
>

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/CA%2BrMWZinYskB9niE1M%3DpztEiUtavE4R1hP6b9cc50QgmP5Jqiw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to