首先定义布局模版
-@ val body:String=""
-@ val title:String="Title"
-@ val script:String=""
!!! 5
html(lang="en")
head
title= title
meta(charset="UTF-8")
link(rel="stylesheet" href="/assets/lib/bootstrap/css/bootstrap.min.css" type="text/css")
body
!=body
script(type="text/javascript" src="/assets/lib/jquery-1.11.0.min.js")
script(type="text/javascript" src="/assets/lib/bootstrap/js/bootstrap.min.js")
!=script
- attributes("title")="Index"
- attributes("layout")="/WEB-INF/scalate/layout.jade"
- attributes("script")=capture
script(src="/assets/pages/index.js")
.container
@RequestMapping(value = Array("/index"), method = Array(RequestMethod.GET))
def htmlToJade() = {
"layout:index"
}