Skip to content

ui-router-server / redirects / compileRedirects

Function: compileRedirects()

ts
function compileRedirects(table): (pathname) => string | null;

Defined in: redirects.ts:166

Compiles a redirect table into an evaluator: pathname in, redirected path out — or null when the pathname does not redirect (no rule or redirecting state matched, target params were invalid, or the redirect lands where it started). Unknown or unaddressable targets and redirect cycles are configuration errors and throw here, not at evaluation.

Parameters

ParameterType
tableRedirectTable

Returns

(pathname) => string | null