According to the official documentation:
<script th:inline="javascript">
/*<![CDATA[*/
var message = /*[[${message}]]*/ 'default';
console.log(message);
/*]]>*/
</script>
More Related Contents:
- How to configure CORS in a Spring Boot + Spring Security application?
- Angular2/Spring Boot Allow Cross Origin on PUT
- How to trigger jquery.ajax() error callback based on server response, not HTTP 500?
- deserialize Jackson object in JavaScript containing JsonIdentityInfo
- Resolving spring:messages in javascript for i18n internationalization
- jQuery document.getElementById() issue
- How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)
- Remove all child elements of a DOM node in JavaScript
- jQuery Validate Plugin – How to create a simple custom rule?
- Asynchronously load images with jQuery
- Asynchronous exception handling with bluebird promises
- Regular Expression for password validation
- Textarea to resize based on content length [duplicate]
- Using socket.io in Express 4 and express-generator’s /bin/www
- onclick open window and specific size
- JQuery Datatables search within input and select
- Reading Excel file using node.js
- What is two way binding?
- option.style.display = “none” not working in safari [duplicate]
- How to recall or restart MathJax?
- Lat Long to X Y Z position in JS .. not working
- Run multiple recursive Promises and break when requested
- Javascript: How to generate formatted easy-to-read JSON straight from an object? [duplicate]
- How should I import the Spatial Illusions milsymbol library into my webpage?
- Does every object in JS have a toString() method?
- react-router (v4) how to go back?
- Use PHP code in external Javascript file
- How can I dispatch function in redux?
- How to run my node.js project on android?
- Use underscore inside Angular controllers