Skip to content

ui-router-server / redirects / compileRoutes

Function: compileRoutes() ​

ts
function compileRoutes(routes, config?): CompiledRoute[];

Defined in: redirects.ts:193

Compiles the url-addressable routes of a declaration set: each state's url appended to its ancestors' (a state's parent is its parent, else its dotted prefix, as in ui-router), params merged rootward. Url-less states contribute nothing and match nothing, as in ui-router.

Parameters ​

ParameterType
routesreadonly RouteDeclaration[]
config?UrlMatcherCompilerConfig

Returns ​

CompiledRoute[]