Render a Play!Framework2 javascript as template?

后端 未结 3 1928
攒了一身酷
攒了一身酷 2021-01-07 03:00

I\'d like to return a .js file from a template in Play!Framework 2.

Here\'s how I did that :

In my views folder, I created a template file :

         


        
3条回答
  •  礼貌的吻别
    2021-01-07 03:32

    You can have a scala.js file but you don't call it with views.js.initials.render() but instead js.initials.render()

    At least with Scala it works with Play 2.2

提交回复
热议问题