I am trying to pass javascripts specific to a page as a parameter to the main template. This is what I have tried:
main.scala.html:
@(ti
I struggled with this as well, but this seemed to work for me:
main.scala.html:
@(title: String, moreScripts: Html = Html(""))(content: Html)
@title
@moreScripts
@content
test.scala.html:
@moreScripts = { }
@main("Page Title", moreScripts) {
Some content here
}
Of course, your Javascript file should be located at app/assets/javascripts
as either a standard Javascript or Coffeescript file