how to use thymeleaf in javascript code example
Example 1: how to use thymeleaf in html
// Add xmlns:th="http://www.thymeleaf.org" into the html opening tag like
<html lang="en" xmlns:th="http://www.thymeleaf.org">
Example 2: use thymeleaf variable in javascript
<script th:inline="javascript"> // Enable Thymeleaf inlining
var email = [[${user.email}]]; // Behaves just like in HTML
</script>