Skip to content

ui-router-server / redirects

redirects ​

Interfaces ​

  • CompiledRoute — One url-addressable state, compiled by compileRoutes.
  • RedirectRule — A when()-style rule: pathnames matching pattern redirect to to.
  • RedirectTable — The input to compileRedirects: the route set plus the rules evaluated over it.
  • RedirectTarget — A redirect target in state terms; the matcher tier formats it back into a path.
  • RouteDeclaration — A state's contribution to the url-addressable route set.
  • RouteMatch — What matchRoute reports for a matched pathname.
  • RouteTableConfig — A route table's url options: the matcher compiler's, plus the trailingSlash policy, which reads each state's kind.

Type Aliases ​

  • RedirectStatusCode — The status a redirect answers with: temporary (302, 303, 307) or permanent (301, 308).
  • RouteIndex — Compiles a mount's routes into the lookup its 'matcher' strategy runs: a pathname in, the matchRoute result over those routes out.

Functions ​

  • compileRedirects — 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).
  • compileRoutes — 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.
  • evaluateRedirects — One-shot convenience over compileRedirects.
  • matchRoute — Returns which route's pattern the pathname matched, with the extracted params.