randombits
randombits

Reputation: 48500

Play Framework 2 view declaration

I am looking at a Play Framework 2 view that starts with the following declarations:

@()

@main("Product Form")

I understand the call @main("Product Form") is passing a String object to the main template. What's with the @() call though? Is it required to declare that if the template is not receiving any arguments from its caller?

Upvotes: 0

Views: 107

Answers (1)

biesior
biesior

Reputation: 55798

In first line you need to declare parameters of the view (which is a Scala function as you know from the doc) however if view doesn't get any params most probably you can remove the @() line without any problem.

Upvotes: 1

Related Questions