HI,
I have a JS function returning some value. And I have to use this value in <div data-sly-test> condition.
How can this be done?
Regrads,
Prateek
Solved! Go to Solution.
Views
Replies
Total Likes
You would use that via the data-sly-use api
Views
Replies
Total Likes
You would use that via the data-sly-use api
Views
Replies
Total Likes
Hi,
I am facing similar issues. I tried to use the Javascript Use API, but that is causing a few problems of its own. I created a separate JS file and called it in my HTML using the <data-sly-use>. So I am able to use the JS variables in my HTML, but it gives me error whenever I use JS functions such as 'alert()' or even on jquery calls. The workaround I got was to implement the JS within <script> tags of my component's HTML.
Is there any way of integrating the two?
My question can be accessed from here :
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies