spring mvc - Thymeleaf: how to include page specific javascript using layouts? -
using thymeleaf there way decorate layout w/ page specific javascript , javascript includes? <!--my layout --> <!doctype html> <html> <head> </head> <body> <div th:replace="fragments/header :: header"> </div> <div class="container"> <div layout:fragment="content"> </div> </div> </body> </html> <!--my page --> <!doctype html> <html layout:decorator="layout"> <head> </head> <body> <div layout:fragment="content"> hello world </div> <script src="pagespecific1.js"></script> <script src="pagespecific2.js"></script> <script> alert("hello world") </script> </body> </html> in layout template, put fragment script. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thym...