This is a feature -- this is why it's called two-way data binding. Your
<my-sample> element publishes a property called `param` and the
<my-input> element is binding that to `input.name`.
In fact, if you change your input element to:
<input id="in" value="{{param}}"/>
You can remove the button and on-click handler, and the values will be
updated whenever the input's value changes.
Related docs:
https://www.polymer-project.org/docs/polymer/databinding.html#dynamic-two-way-data-binding
https://www.polymer-project.org/docs/polymer/binding-types.html#node-bindings
https://www.polymer-project.org/docs/polymer/polymer.html#published-properties
Cheers,
Arthur
On Mon, Oct 20, 2014 at 11:01 AM, Leandro Cruz <[email protected]>
wrote:
> Hi all. I think I found a bug polymer.concat.js setValueFrom(). It updates
> the value of an attribute object when propagating a change.
> The "reproducer" is called bug.html. If you run it, it will show my name
> 'Leandro Rodrigo Saad Cruz' which came from object x. Now, if you set a new
> value using the set button, x.name is updated too.
> Not sure if it's a bug or a feature? What do you say?
>
> Cheers!
>
> 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/92cde8f3-cf93-4b10-b338-51636a953129%40googlegroups.com
> <https://groups.google.com/d/msgid/polymer-dev/92cde8f3-cf93-4b10-b338-51636a953129%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
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/CADSbU_woypHT1cSOLd%2BWdc%2B0oiVB_ARvTaE0i_%2BAGq48g7k7Og%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.