[英]Thymeleaf th:block not working any more
我在Thymeleaf
寫了一段代碼:
<th:block th:if="${i.mid} > ${yesterday.tableRateModel.rates[e.index].mid}">
<i class="glyphicon glyphicon-arrow-up"></i>
</th:block>
<th:block th:if="${i.mid} == ${yesterday.tableRateModel.rates[e.index].mid}">
<i class="glyphicon glyphicon-resize-small"></i>
</th:block>
<th:block th:if="${i.mid} < ${yesterday.tableRateModel.rates[e.index].mid}">
<i class="glyphicon glyphicon-arrow-down"></i>
</th:block>
在這種情況下,我得到如下錯誤: org.xml.sax.SAXParseException: The value of attribute "th:if" associated with an element type "th:block" must not contain the '<' character.
但是,當我評論最后一個th:block
一切正常。 怎么了?
問題出在<
用這個:
< for <
> for >
≤ for <=
≥ for >=
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.