spring-mvc - 如何在 tymeleaf 布局装饰器中添加页面特定的脚本标签?
问题描述
可以说,我有以下布局页面 tmeplate.html
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
...
<body>
...
<section layout:fragment="custom-content">
DEFAULT CONTENT GOES HERE
</section>
...
</body>
</html>
我的 index.html 页面如下
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="template">
...
<body>
...
<section layout:fragment="custom-content">
PAGE SPECIFIC CONTENT GOES HERE
</section>
...
</body>
</html>
那么,如何在结束正文标记之前添加 index.html 页面特定脚本标记?
解决方案
推荐阅读
- javascript - Chrome 在 Angular 中使用 resumablejs 上传大于 1.5 GB 的文件时崩溃
- php - PHP 中的 Rest API:{'error': "Missing 'inputs' or 'instances' key"}
- firebase - 无法在 Firebase 中创建新用户属性
- amazon-web-services - AWS EC2 Autoscaling Target Tracking 策略如何扩展?
- javascript - [JS/HTML/PHP]刷新页面后的特定div
- c# - DryIoc:将请求范围服务的代理注入单例
- javascript - 为什么 window.getSelection() 不工作?它不会占用文本
- javascript - 如何通过全局 .scss 文件而不是 Vue 中的 main.js 导入引导程序
- wordpress - WordPress:所有帖子都在呈现,而不是仅在分类页面上呈现分配的分类帖子
- python - 如何使用 NLP 和 Python 在字符串中查找城市名称