Inside of a file like index.scala.html, you may want to get or set variables between Scala and JavaScript. Here are some examples.
@test = { "something" }
@test = @{
user.isDefined
}
var data = @Html(Json.stringify(Json.toJson(data)));
Inside of a file like index.scala.html, you may want to get or set variables between Scala and JavaScript. Here are some examples.
@test = { "something" }
@test = @{
user.isDefined
}
var data = @Html(Json.stringify(Json.toJson(data)));