【问题标题】:Include an Element Inside Current HTML with Thymeleaf使用 Thymeleaf 在当前 HTML 中包含一个元素
【发布时间】:2016-10-09 20:41:34
【问题描述】:

是否可以使用 Thymeleaf 在当前 HTML 中包含一个元素,例如:

<span id="el">Rouro</span>
<h2 th:text="|${elo.mimo} nakuru: |" th:include="this :: el"> --- </h2>

【问题讨论】:

    标签: spring-boot thymeleaf


    【解决方案1】:

    这不是您问题的确切答案,但可以通过以下代码实现所需的功能:

    <span id="el">Rouro</span>
    <h2><th:block th:text="|${elo.mimo} nakuru: |" /><th:block th:include="this :: el" /></h2>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-03-02
      • 1970-01-01
      • 2017-08-04
      • 1970-01-01
      • 2015-04-25
      • 1970-01-01
      • 2020-02-17
      相关资源
      最近更新 更多