Skip to content

ui-router-server / matcher

matcher ​

Interfaces ​

  • CompiledMatcher — A compiled url pattern: inert data produced by urlMatcherFactory's compile and consumed by exec, format, and compare.
  • CompiledParam — A compiled parameter: inert data for one placeholder of a pattern.
  • ParamDeclaration — A per-param configuration: core's ParamDeclaration members that matching honors, plus dynamic and inherit, which only shape transitions and matching ignores, so one declaration serves a client router too.
  • ParamType — The pieces of a ui-router ParamType that path matching and url formatting exercise, with core's member signatures.
  • Replace — An input rewrite applied before typing (absent/empty/squash handling).
  • UrlMatcherCompileOptions — Per-pattern options for a compiler's compile (see urlMatcherFactory).
  • UrlMatcherCompilerConfig — Compiler-wide defaults for urlMatcherFactory, shared by every pattern it compiles: the router-wide RouterUrlConfig options plus decodeParams, which core keeps off its public setters.

Functions ​

  • compare — Sorts two compiled matchers by static specificity, as core's UrlMatcher.compare: path tokens compared position-by-position, slash before static text before a param.
  • exec — Tests a url path against a compiled matcher.
  • format — Builds a url from a compiled matcher by substituting parameter values — the inverse of exec, mirroring core's UrlMatcher.format for the supported subset (no parent-matcher composition: matchers here never append).
  • urlMatcherFactory — Creates a matcher compiler — named for core's UrlMatcherFactory, whose defaults it keeps: strict trailing-slash matching, case-sensitive, percent-decoding on, and a default squash policy of false.