I would like to have an ‘outer’ WebC component that takes a property foo and inside its markup it refers to another, ‘inner’ WebC component, which has a slot. I want to pass on the value received for the property foo in the outer component to the inner component’s slot.
I would expect the text lorem ipsum to be displayed in the red box of inner-comp, since outer-comp passes the value of foo to the special @text property that should set the content between the inner-comp tags.
Context
I would like to have an ‘outer’ WebC component that takes a property
foo
and inside its markup it refers to another, ‘inner’ WebC component, which has a slot. I want to pass on the value received for the propertyfoo
in the outer component to the inner component’s slot.MWE
I attempted this the following way.
content/index.webc
:_components/outer-comp.webc
:_components/inner-comp.webc
:Expected Output
I would expect the text
lorem ipsum
to be displayed in the red box ofinner-comp
, sinceouter-comp
passes the value offoo
to the special@text
property that should set the content between theinner-comp
tags.Something like:
Actual Output
The slot remains empty. Interestingly, it seems to be set empty explicitly, as the default slot content (
[DEFAULT]
) is not displayed.Am I misunderstanding or doing something wrong? If this is a bug, what workaround could I seek? Thanks in advance.