play.api.routing.JavaScriptReverseRouter
Attributes
-
Graph
-
-
Supertypes
-
class Object
trait Matchable
class Any
-
Self type
-
Members list
Generates a JavaScript router.
Generates a JavaScript router.
For example:
JavaScriptReverseRouter("MyRouter")(
controllers.routes.javascript.Application.index,
controllers.routes.javascript.Application.list,
controllers.routes.javascript.Application.create
)
And then you can use the JavaScript router as:
var routeToHome = MyRouter.controllers.Application.index()
Value parameters
-
name
-
the JavaScript object name
-
routes
-
the routes to include in this JavaScript router
Attributes
-
Returns
-
the JavaScript code