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
| Parameter | Type |
|---|---|
routes | CompiledRoute[] |
pathname | string |
Returns
RouteMatch | null