簡體   English   中英

胸腺th:塊不再起作用

[英]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一切正常。 怎么了?

問題出在<

用這個:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM