我在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
时,一切正常。有什么问题?
问题在于<
答案 0 :(得分:1)
使用此:
< for <
> for >
≤ for <=
≥ for >=