spring - How to control the href attribute in thymeleaf -
i'm new thymeleaf.
the question easy when it's in jsp. beats me in thymeleaf.
i want complete function below:
if (page.number<=1) html this: <li class="q-pagination-disabled">pre</li> else <li><a href="/pages/{page.number-1}">pre</a></li> but can't finish th:if,th:href,th:remove , on. know how it?
try following , let me know if worked you
<li th:if="${page.number le 1}" class="q-pagination-disabled">pre</li> <li th:if="${page.number gt 1}"><a th:href="@{/pages/{page}(page=${page.number-1})}">pre</a></li>
Comments
Post a Comment