Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

How to pass parameter from parent to child component using data-sly-resource.

Avatar

Level 2

Hi,

I have included a component inside other component using data-sly-resource. So how can I pass parameter from the parent to child using data-sly-resource.
Or Is there any other way for that.

Please share your response.

@arunpatidar 
Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

you can only do it using selectors

<!--/* Manipulating selectors: */-->
<section data-sly-resource="${'my/path' @ selectors='selector1.selector2'}"></section>
<section data-sly-resource="${'my/path' @ selectors=['selector1', 'selector2']}"></section>



Arun Patidar

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

you can only do it using selectors

<!--/* Manipulating selectors: */-->
<section data-sly-resource="${'my/path' @ selectors='selector1.selector2'}"></section>
<section data-sly-resource="${'my/path' @ selectors=['selector1', 'selector2']}"></section>



Arun Patidar