<script th:inline="javascript">
/*<![CDATA[*/
var msg = [[${msg}]];
/*]]*/
</script>
The red line appears on the first curly brace and it says ' "," is expected. ' What is the problem? How should I change it?
If you're looking for the correct way to do natural templates w/JavaScript, it should look like this:
<script th:inline="javascript">
var msg = /*[[${msg}]]*/ "";
</script>