2017-07-25 39 views
0

我写的代码块中ThymeleafThymeleaf日:块停止工作了

<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一切正常。哪里不对?

问题是与<

回答

1

使用此:

&lt; for < 
&gt; for > 
&le; for <= 
&ge; for >=