2017-07-25 4 views
0

Ich habe einen Code-Block in Thymeleaf geschrieben:Thymeleaf th: Block funktioniert nicht mehr

<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> 

Und in diesem Fall ich Fehler wie: org.xml.sax.SAXParseException: The value of attribute "th:if" associated with an element type "th:block" must not contain the '<' character.

Aber wenn ich einen Kommentar letzten th:block alles funktioniert einwandfrei. Was ist falsch?

Das Problem ist mit <

Antwort

1

Mit dieser:

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