How to pass parameter from parent to child component using data-sly-resource. | Community
Skip to main content
New Participant
October 18, 2022
Solved

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

  • October 18, 2022
  • 1 reply
  • 928 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

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>

1 reply

arunpatidar
arunpatidarAccepted solution
New Participant
October 18, 2022

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