using thymeleaf之十模板注释
来源:互联网 发布:淘宝客步骤 编辑:程序博客网 时间:2024/05/29 08:46
10 注释
10.1 标准html/xnl注释
语法:<!-- -->
这个不用解释了。
10.2 解释器级注释块
语法:<!--/* */-->
thymeleaf解析时会移除代码
单行:<!--/* xxxxx */-->
双行:
<!--/*-->
Xxxxxx
Xxxxxx
<!--*/-->
10.3 针对原型的注释
语法:<!--/*/ /*/-->
thymealeaf解析时会移除掉此标签对,但不会移除其中的内容。
10.4 与th:block结合
thymealeaf解析时会移除掉此标签对,但不会移除其中的内容。
下面一段代码大家可以运行一下看看效果就明白了:
<div><ol><li>解释器级注释块(thymeleaf解析时会移除掉注释块所有代码):<!--/* this is content! */--></li><li>针对原型的注释(thymeleaf解析时会移除掉注释标签,但保留标签内的内容):<!--/*/ this is content! /*/--></li><li>与th:block结合(thymeleaf解析时会移除掉th:block注释块,但保留标签内的内容): <!--/*/<th:block th:each="user:${list}">/*/--> <div th:text="${user.userName}"></div> <!--/*/</th:block>/*/--></li></ol></div>
0 0
- using thymeleaf之十模板注释
- Thymeleaf教程 (十) 注释与块
- Thymeleaf教程 (十) 注释与块
- using thymeleaf之三文字
- using thymeleaf之十一内联
- Thymeleaf 之 页面模板应用
- springboot之模板引擎 --- thymeleaf
- using thymeleaf之二简单表达式
- using thymeleaf之四操作符
- using thymeleaf之五条件表达式
- using thymeleaf之九属性优先级
- thymeleaf模板
- Thymeleaf 模板
- thymeleaf 模板
- thymeleaf 模板
- springboot之thymeleaf模板引擎章节
- thymeleaf模板引擎之基本语法
- using thymeleaf之一thymeleaf认识
- php面向对象中的知识总结
- 报表
- 【Android 系统开发】 编译 Android文件系统 u-boot 内核 并烧写到 OK-6410A 开发板上
- 用Excel做一个简易的投票工具
- 单链表的就地置换
- using thymeleaf之十模板注释
- RESTful Web Services Part 3 - URI
- IOS小知识点4设计模式大全(一)
- JS光标定位到文本框字符串末尾
- tomcat报错:Error configuring application listener of class com.channelsoft.appframe.utils.BeanFactoryU
- Java创建线程的两个方法
- magento 根据产品id,获取产品信息
- NPOI 颜色设置
- Android fragment在锁屏解锁后会出现重新onCreate的解决办法