aurelia / framework

The Aurelia 1 framework entry point, bringing together all the required sub-modules of Aurelia.
MIT License
11.76k stars 623 forks source link

Dynamic Property Forwarding for Custom Elements #794

Closed manueljuan3 closed 5 years ago

manueljuan3 commented 7 years ago

Is there a way to forward all of an element's properties similar to how React can transfer all the props? https://titobouzout.github.io/react/docs/transferring-props.html

Was looking to use Dynamic Options Binding but it is only available for custom attributes and not elements. Any solutions?

EisenbergEffect commented 7 years ago

Not currently, no. It would make a nice contribution though :)

janat08 commented 5 years ago

I'm not sure if this is worthwhile with shadow dom and slots.

bigopon commented 5 years ago

There is a way to do it with Aurelia, though not obvious. For anyone curious, please have a read here https://discourse.aurelia.io/t/assign-all-new-attributes-to-specific-element-transparent-wrapper-components/1949

bigopon commented 5 years ago

@EisenbergEffect I think this issue can be closed, it's tracked in vnext, and has work around in vCurrent, together with a plugin that demonstrates its behavior, also with some ready made elements: https://github.com/aurelia-contrib/aurelia-global-binding