In games :
Reverse Routing for Public Assets
For any controller displayed in the routes file, a reverse controllers.routes.Assets is created in controllers.routes.Assets. You use this to cancel the URL required to get a public resource. For example, from the template:
<script src="@routes.Assets.at("javascripts/jquery.js")"></script>
This will result in the following result:
<script src="/assets/javascripts/jquery.js"></script>
Please note that we will not specify the first folder parameter when returning the route. This is because our routes file defines one mapping for the Assets.at action, where the folder option is fixed. Therefore, it clearly does not need to be indicated.
However, if you define two mappings for the Assets.at action, for example:
GET /javascripts/*file controllers.Assets.at(path="/public/javascripts", file) GET /images/*file controllers.Assets.at(path="/public/images", file)
Then you will need to specify both parameters when using a reverse router:
<script src="@routes.Assets.at("/public/javascripts", "jquery.js")"></script> <image src="@routes.Assets.at("/public/images", "logo.png")">
Any static html in the public / partials directory will be publicly available in /assets/partials/someHtml.html. So, strictly speaking, you do not need the route / partials / * file
source share