object JavaScriptReverseRouter
- Source
- JavascriptReverseRouter.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- JavaScriptReverseRouter
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- def apply(name: String, ajaxMethod: Option[String], host: String, routes: JavaScriptReverseRoute*): JavaScript
- def apply(name: String = "Router", ajaxMethod: Option[String] = Some("jQuery.ajax"))(routes: JavaScriptReverseRoute*)(implicit request: RequestHeader): JavaScript
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()
- name
the JavaScript object name
- routes
the routes to include in this JavaScript router
- returns
the JavaScript code