2017-07-25 44 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 >=