Thymeleaf Meteor

[Thymleaf] 글 상세보기 처리 타임리프 문법(Pathvariable)사용

DoubleMeteor 2021. 11. 2. 10:18

타임리프에서 글 상세보기를 구현할 때 페이지이동 처리방법(Pathvariable사용) 변수 넘기기

 

                <ul class="port_list cb" >
                    <li th:each="notice : ${noticeList}">
                        <a th:href="@{'/notice/'+ ${notice.idx}}">
                            <div class="n_tlt new">
                                <div th:text="${notice.noticeTitle}">
                                </div>
                                <span>NEW</span>
                            </div>
                            <div class="date" th:text="${notice.createDate}"></div>
                        </a>
                    </li>
                </ul>