0
我想在视图文件中声明一个scala变量。如何做呢?在声明中声明一个scala变量2
@(title: String)(content: Html)
//this line isnt compiling. I tried without the word defining but it doesn't work either
@defining(l:Seq[String] = Seq("hello","hello2"))
<html><head>...
<body>
@content
//I want to use the list here
<ul id="hardcode-list" >
@l.map{item=><li>item</li>}
</ul>
</body>
</head></html>
的可能的复制[玩2.0中创建一个变量,并赋值(http://stackoverflow.com/questions/11232772/玩-2-0-创建-A-可变和分配值) –