is it possible to create generic templates?
Pseudo code:
@(myForm: Form[T])
So I can reuse them like this:
@inputText(
myForm("title"),
'_label -> "title"
)
- If yes, How do I do it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the magic underscore for that:
This is called an existential type in Scala, it roughly means “there exists a type parameter but I don’t care what it is”.