Is there any way of passing a property from a block component to an inner component? something like this with propertyFromComponentOne
:
{{#component-one}}
{{component 'component-x' propertyA=propertyFromComponentOne}}
{{/component-one}}
Is there any way of passing a property from a block component to an inner component? something like this with propertyFromComponentOne
:
{{#component-one}}
{{component 'component-x' propertyA=propertyFromComponentOne}}
{{/component-one}}
I’ve realized how to do it. First, adding in the yield part the property I want to share:
{{yield propertyFromComponentOne}}
and then, creating an alias(?) in the block component for the property:
{{#component-one as |propertyFromComponentOne|}}
{{component 'component-x' propertyA=propertyFromComponentOne}}
{{/component-one}}