I have an html file, thymeleaf, that has a variable passed from the controller that I need to give to a function on an external javascript file. How do I do this ?
I can get the variable like
<label th:utext="${id}" ></label>
I need to pass that id to a function that's inside
<script th:src="@{/js/myfunctions.js}" type="text/javascript"></script>
There's a function there :
function myFunction(id){
}