Class: Router

Router

new Router(routesTranslations)

Router.js, line 33
Name Type Description
routesTranslations RoutesTranslations

Methods

_addInternalRoute(routeKey, route)

Router.js, line 65
Name Type Description
routeKey string
route RouterRoute

_createRoute(completePath, lang, route, match, groupCount, namedParams){Route}

Router.js, line 164
Creates a new Route result
Name Type Description
completePath string
lang string
route RouterRoute
match Array
groupCount int
namedParams Map
Returns:
Type Description
Route route

_findRoute(routes, completePath, path, lang, namedParams){RouterRoute}

Router.js, line 92
Name Type Description
routes Array
completePath string
path string
lang string
namedParams Map
Returns:
Type Description
RouterRoute route the route or undefined if none found

addRoute(routeKey, route)

Router.js, line 53
Name Type Description
routeKey string
route RouterRouteCommon

find(path, lang){Route}

Router.js, line 77
Name Type Description
path string
lang string optional
Returns:
Type Description
Route

get(key){Route}

Router.js, line 45
Get a Route by its key
Name Type Description
key string
Returns:
Type Description
Route

urlGenerator(lang, routeKey, params){string}

Router.js, line 229
Create a link
Name Type Description
lang string
routeKey string
params.extension string optional
params.queryString string optional
params.hash string optional
params
Returns:
Type Description
string