Reputation: 2136
I have a basic SpringBoot app. using Spring Initializer, embedded Tomcat, Thymeleaf template engine, and package as an executable JAR file.
I have this message in my message.properties
resetPassword.sending.email=Sending email
I want to use it in the HTML,
$("#sendEmailButtonId").click(function(e) {
$("#emailLabelId").text([[#{resetPassword.sending.email}]]);
});
but it does not replace the text
Upvotes: 1
Views: 2233
Reputation: 20487
Add <script th:inline="javascript">
in the surrounding script block for thymeleaf to parse [[${...}]]
expressions.
Upvotes: 2