9
Có cách nào để sử dụng toán tử Java instanceof
trong Thymeleaf không?Sử dụng instanceof trong Thymeleaf
Cái gì như:
<span th:if="${animal} instanceof my.project.Cat" th:text="A cat"></span>
<span th:if="${animal} instanceof my.project.Dog" th:text="A dog"></span>
cảm ơn! cả hai phiên bản đều hoạt động tuyệt vời! – Andrea