Skip to content

Tymleaf #5

@mic050r

Description

@mic050r
  • thymeleaf : 템플릿 엔진, HTML 페이지와 서버 데이터를 결합

  • th:text="${'안녕' + value + '입니다'}"

  • th:if="${value}"

  • th:each="item:${result}" -> th:text="${item.value}"

  1. Fragment 정의 : th:fragment를 사용하여 재사용 가능한 HTML 블록을 정의

    <th:block th:fragment="fragmentName">...</th:block>
  2. Fragment 불러오기: 다른 HTML 템플릿에서 th:replace 또는 th:include를 사용하여 fragment를 불러오기

    <th:block th:replace="filePath :: fragmentName"></th:block>

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions