You cannot declare variables (for example) in game templates. ( here is a discussion of google groups )
The first thing you can do is that you only need one value in your template:
@views.html.header("title")(List("a","b"))
Note that you should use ( and ) , I believe that everything between {} interpreted as HTML code (hence an error of your type of mismatch).
However, this is not suitable if you need it several times in your templates. Then you can use the defining block:
@defining(List("a","b")) { jsList => @* using it once *@ @views.html.header("title")(jsList) @* using it twice *@ <p>My list contains @jsList.size elements.</p> @* ... *@ }
Aerus source share