我是Jade和Scalate的新手。我有以下途徑定義:在Scalate/Jade中未設置值錯誤
get("/") {
jade("index",
"pageTitle" -> "Welcome to Jade",
"welcomeMessage" -> "Hello my pretties")
}
而且模板:
[email protected] val pageTitle: String
[email protected] val welcomeMessage: String
!!! 5
html(lang="en")
head
title= pageTitle
body
h1= welcomeMessage
我得到頁面上呈現的錯誤是:
The value for 'title' was not set
org.fusesource.scalate.NoValueSetException: The value for 'title' was not set
at org.fusesource.scalate.RenderContext$$anonfun$attribute$1.apply(RenderContext.scala:159)
即使我刪除行title= pageTitle
我仍然得到錯誤。指的是什麼錯誤以及如何修復它?