Is it possible to avoid .scala.html suffix in playframework?

107 Views Asked by At

I hate long filename, and scala here make no sense to me(I don't use scala at all). So is there any way to remove .scala suffix ?

2

There are 2 best solutions below

0
cchantep On

It makes sense as you mix Scala code (@...) with html in such file. Btw template file is compiled to be a scala function you can call from other scala code.

0
Govind Singh On

No,not Possible I Think! neither for html or xml

you need to use .scala.html or .Scala.xml

Templates are compiled as standard Scala functions in Play Framework.

If you create a views/Application/index.scala.html template file, it will generate a views.html.Application.index class that has an apply() method.