Closed
Description
I'd like to see a template element like <MyComponent {{myObject}}>
take all the properties of the tag's value and apply them to the element as attributes, e.g. if myObject
is {foo: "mario", bar: "luigi"}
, then the element is equivalent to <MyComponent foo="mario" bar="luigi">
.
Use cases for this include tree node components, which could specify their children be displayed like so...
{{#each children as childData}}
<:Self {{childData}}/>
{{/each}}
...and dynamic components, which may need to send arbitary data to their arbitrary component.
<:Component {name} {{data}}/>
I'd be okay with this being forbidden for non-component elements and/or not allowed to mix with any other attributes.
Metadata
Metadata
Assignees
Labels
No labels