【发布时间】:2013-02-16 08:21:29
【问题描述】:
我正在尝试将隐式参数传递给 Play 模板...下面是我的代码:
test.scala.html:
@(implicit request: RequestHeader)
@()(implicit p = Some(controllers.routes.MyController.myActionMethod().absoluteURL))
@main("My Title") {
// some HTML here...
}
main.scala.html:
@(title: String)(implicit request: RequestHeader, p: Option[String])
<html>
...
</html>
p 从未被分配...而且我总是收到错误消息could not find implicit value for parameter p。我错过了什么吗?谢谢。
【问题讨论】:
标签: playframework playframework-2.0