I'm trying to process the thymeleaf template with plain text which includes the conditional operator:
<th:block th:if = "${[(${test})] == true}"> it works </th:block>
but i have such output:
<th:block th:if = "${true == true}"> it works </th:block>
Could you tell me, where did i go wrong?
If you're using textual template modes , you can't use html tags like <th:block />
anymore. Instead, the syntax looks like this:
[# th:if="${test}"]it works[/]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.