Is it possible to pass a property to a component from a block component?


#1

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}}

#2

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}}