You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow data binding between distributed children and host. There isn't any easy way for binding data to distributed children, which must exist inside the document dom.
Maybe not in a sense of piercing through the content, rather allowing anonymous data binding in "template is=dom-bind" with {{data}} applied to host and child. No one likes exceptions, distributed children should be able to bind to attributes of their host in a simple way. (as shown in the below example).
Use Case - In my use case the distributed children must exist inside the document dom, & cannot exist inside another local dom (to share a property for example between distributed children and host, through the use of a grandparent element).
For examples - Using carbon-route, I need to share the data attribute between host element and distributed children, each content child is a page/view in *-pages (e.g. iron-pages). Basically trying to create a builder which allows each user to specify his own routes and pages. The page elements (custom element views for the pages) are added in the server side according to the user's settings. The user can choose to change/use a different custom element to view his content. Together with integrating other server side platforms. Therefore distributed children must be in the document dom.
Global Polymer Attributes - doesn't exist, there are no global variables with binding features. All must be inside of a local dom to serve as an intermediate and share properties together.
I feel frustrated, there isn't any easy way for binding data to distributed children, which exist inside the document dom. Now I'm forced to move the distributed content elements into the local dom. Passing settings and custom elements through the element's attribute is messy & impossible in my use case.
Thank you.
The text was updated successfully, but these errors were encountered:
Actually it is possible to use data-binding. I had an error in the camelcase of the attribute markup which prevented the binding functionality.
I used routeData ="{{...}}" instead of route-data="{{...}}".
Now it works fine in both "template is=dom-bind" as anonymous attribute & in case of binding to nodes inside local DOM.
Allow data binding between distributed children and host. There isn't any easy way for binding data to distributed children, which must exist inside the document dom.
Maybe not in a sense of piercing through the content, rather allowing anonymous data binding in "template is=dom-bind" with {{data}} applied to host and child. No one likes exceptions, distributed children should be able to bind to attributes of their host in a simple way. (as shown in the below example).
Use Case - In my use case the distributed children must exist inside the document dom, & cannot exist inside another local dom (to share a property for example between distributed children and host, through the use of a grandparent element).
For examples - Using carbon-route, I need to share the data attribute between host element and distributed children, each content child is a page/view in *-pages (e.g. iron-pages). Basically trying to create a builder which allows each user to specify his own routes and pages. The page elements (custom element views for the pages) are added in the server side according to the user's settings. The user can choose to change/use a different custom element to view his content. Together with integrating other server side platforms. Therefore distributed children must be in the document dom.
I've tried:
<template is="dom-bind">
<host-element routeData="{{routeData}}">
<distributedchild-element routeData="{{routeData}}"></distributedchild-element>
</host-element>
</template>
I feel frustrated, there isn't any easy way for binding data to distributed children, which exist inside the document dom. Now I'm forced to move the distributed content elements into the local dom. Passing settings and custom elements through the element's attribute is messy & impossible in my use case.
Thank you.
The text was updated successfully, but these errors were encountered: