is it possible to create generic templates?
Pseudo code:
@(myForm: Form[T])
So I can reuse them like this:
@inputText(
myForm("title"),
'_label -> "title"
)
Use the magic underscore for that:
@(form: Form[_])
This is called an existential type in Scala, it roughly means "there exists a type parameter but I don't care what it is".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With