If I have something like this in Application.scala.html
<div id="action">Some content</div>
<script>
$('action').click(function(){
window.open(@routes.Application.index());
)};
</script>
This works fine, no problem.
But if I put the script in its own Javascript file, I can no longer use the @routes.Application.index()
reference. Is is possible in Play to reference Scala templates in a separate Javascript file place under public/javascripts
?