When using Thymeleaf, I am trying to show a specific image conditionally. It works fine
<img th:if="*{ score < 20 and score > 0}" src="images/Fast-Track-No1.jpg" th:href="@{/images/Fast-Track-No1.jpg}" style = "width: 450px;" alt=""/>
However, this does not work. Only change & gt> ge
<img th:if="*{ score < 20 and score ≥ 0}" src="images/Fast-Track-No1.jpg" th:href="@{/images/Fast-Track-No1.jpg}" style = "width: 450px;" alt=""/>
I get the error "Missing expected character '&'"
All I did was change & gt> ge ..
I followed the documentation here: http://www.thymeleaf.org/doc/html/Using-Thymeleaf.html#comparators-and-equality
At first I checked with ge, and there is no difference. I also tried, as the document shows no ampersand per se
*{score} ge; 0"
and he still fails and causes errors. According to my pom.xml file, I am using ThymeLeaf 2.1.2.RELEASE.
Thanks,
source
share