Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property bindings on dynamically created elements via Polymer.Base.create #3559

Closed
43081j opened this issue Apr 4, 2016 · 2 comments
Closed

Comments

@43081j
Copy link
Contributor

43081j commented Apr 4, 2016

Description

When creating child elements dynamically like so:

this.$.container.appendChild(this.create('my-element-' + foo, {
    item: this.item
});

Change notification ("two-way binding") is essentially lost. If the parent changes item in some way, the child is never notified and vice versa.

Example:

Here.

If you click either button, the other doesn't receive the new value. Also, the observer in the parent only fires when the button in the parent is clicked, not the child.

This is true in all 1.x versions by the looks of it.

Is this just by design? If so, what is the recommended way of dynamically creating elements like the above? The tag name needs to be computed in my case.

@kaste
Copy link
Contributor

kaste commented Apr 15, 2016

Asked once a week. Close this and follow #3460 instead.

@dfreedm
Copy link
Member

dfreedm commented Apr 15, 2016

Closing for #3460

@dfreedm dfreedm closed this as completed Apr 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants