본문 바로가기

'o'

[Thymeleaf] classappend

1
2
3
<div th:classappend="${#httpServletRequest.requestURI} == 'url' ? 'on'">
    <a href="list">list</a>
</div>
cs

 

 

 

 

 

> solbel.tistory.com/1410

 

[thymeleaf] 타임리프 th:classappend 동적으로 클래스 추가하기

[thymeleaf] 타임리프 th:classappend 동적으로 클래스 추가하기 타임리프에서 현재 페이지 값 혹은 넘겨받은 값을 기준으로 조건에 맞으면 클래스를 추가하는 경우가 있습니다. 그럴때 아래처럼

solbel.tistory.com