I am currently reorganizing a Play! project where there is a lot of JS code in the HTML template files. This code should be moved to external JS files for better readability
In the main template, generate a 'Javascript router', something like:
And then in any 'static' javascript file, use this router:
$.get(routes.doThis({param1: x, param2: 'yop'}))