For each operator in Thymeleaf

前端 未结 2 1393
-上瘾入骨i
-上瘾入骨i 2020-12-17 07:34

I can not find syntax for building simple for-each-loop in Thymeleaf template. I\'m not satisfied with just th:each=\"\" attribute, because it copi

2条回答
  •  执念已碎
    2020-12-17 08:23

    Use th:block as stated in the Thymeleaf guide

    th:block is a mere attribute container that allows template developers to specify whichever attributes they want. Thymeleaf will execute these attributes and then simply make the block disappear without a trace.

    So it could be useful, for example, when creating iterated tables that require more than one for each element:

    
          
    ... ...
    ...

提交回复
热议问题