Skip to content

ui-router-server / matcher / exec

Function: exec()

ts
function exec(matcher, path): 
  | RawParams
  | null;

Defined in: url-matcher.ts:537

Tests a url path against a compiled matcher.

Returns the captured parameter values when the path matches the pattern, or null when it does not. Search params always appear in the result, resolved to their static defaults (undefined when none is declared).

Parameters

ParameterType
matcherCompiledMatcher<unknown>
pathstring

Returns

| RawParams | null