Skip to content

ui-router-server / redirects / matchRoute

Function: matchRoute()

ts
function matchRoute(routes, pathname): RouteMatch | null;

Defined in: redirects.ts:138

Returns which route's pattern the pathname matched, with the extracted params. The most specific match wins (compare); ties go to declaration order.

Parameters

ParameterType
routesCompiledRoute[]
pathnamestring

Returns

RouteMatch | null