In a page level component I have set a variable.
<c:set var="stepIndex" value="-1" scope="page"/>
Now I author a few component on the page. These components should have access to the stepIndex variable. The components are written in HTL and I want to access stepIndex inside data-sly-use Javascript api.
How can I achieve this ?
I can do this using JSP scriplets using request. GET and SET attributes but I want to avoid that.