nicolaslopezj:router-layer
This project helps package authors to support multiple routers.
The layer supports:
Requires: iron:router
Requires: kadira:flow-router
kadira:blaze-layout
For flow router it allows you to use {{# Layout }}
like
iron:layout
without using it as a dependency (only for plain {{> yield }}
).
Creates a new route
Parameters
url: String
, The path of the route
options
options.template: String
, The template for this route
options.layout: String
, Optional. The layout for this route
options.name: String
, Optional. The name of the route
Returns the path for a route
Parameters
routeName: String
, The name of the route
params: Object
, Parameters for the route
Returns: String
, The requested url
Check if the current route has the specified name and params (if set)
Parameters
routeName: String
, The name of the route
params: Object
, Optional. The parameters of the route
Returns: Boolean
, True if the route is active
Check if the current route name, divided by dots, starts with the specified name
Parameters
routeName: String
, The name of the route
Returns: Boolean
, True if the route is active
Redirects the user to the specified route
Parameters
routeName: String
, The name of the route
params: Object
, Optional. The parameters of the route
Returns a parameter of the url
Parameters
paramName: String
, The name of the parameter
Returns a parameter of the url
Parameters
queryStringKey: String
, The name of the parameter
Returns the path of the current route