Extends
Members
Route
Router specific Route
constructor
Type:
function
Constructor
- options
- Type:
Object
- routeNameFormat optional
- Type:
String
will be used to format route UID string. Should contain placeholders:
{method}
&{name}
{version}
- version optional
- Type:
String
will be part of route path
- url
- Type:
String
relative endpoint
new Router(options)
Holds Route
definition objects which have common part of a url path
Parameters:
Fires:
Inherited Methods
- options
- Type:
Object
- name
- Type:
String
- type
- Type:
String
- url
- Type:
String
- format
- Type:
String
buildRoute(options)
RouteInterface
creates new Route
object
Parameters:
Fires:
Returns:RouteInterface
getUrl()
String
returns absolute path the router is binded to
Returns:String
setRouteNameFormat(format)
undefined
Parameters:
undefined
Example:
router.setRouteNameFormat('{method}{Name}_{version}');
Events
build-route