Forum Discussion
1 Reply
Sort By
You can use it in a similar way how you use is it in freemarker.
var corenode_id = '${coreNode.id}';
But it will through an error in the component preview. You have to test it in the frontend i.e. Forum page, category page etc.
Alternatively, you can also assign it to freemarker variable and then use it in JS
<#assign id = coreNode.id />
<script>
console.log('${id}')
</script>