-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Dynamically added elements don't get data-binded #2477
Comments
Can you please add some more code? How do you add the element? |
Is there a way to expose the polymer API, so that the same logic can be applied to a custom element. This way polymer can still act as a usable front end framework? |
#1778 is for exposing that API. Please use declarative bindings for now. On Fri, Sep 25, 2015, 6:34 AM Apoorv Verma [AP] [email protected]
|
Unable to write the generators forms. I can`t foresee all possible controls in the template. Controls at me as plug-ins are connected . |
I must say that i think this is the biggest limitation i have found in Polymer: Not being able to databind to dynamically created elements. For a one page webapp, like the one i am currently developing, there is simply no way to know from page load, what or how many elements is needed in the entire life time of the session. :-( |
I hope this code useful: #1778 (comment) |
I have a dashboard form of an app that is fully written in Polymer, however when I AJAX fetch a sub page within the app, I create elements that need to be binded in relation to the app, I was able to get around this problem by nesting dom-binds [which allowed for a second scope]
To get the parent template values binded I also make in the parent template.
However these only work if the listeners were already in my main app file and not created after the AJAX call.
So Polymer has an issue with not being able to create data-binding with elements created dynamically.
The text was updated successfully, but these errors were encountered: