{ "id": "api/router/IsActiveMatchOptions", "title": "IsActiveMatchOptions", "contents": "\n\n
\n
\n
\n \n API > @angular/router\n
\n \n
\n \n
\n

IsActiveMatchOptionslink

\n \n \n \n \n \n
\n \n \n\n
\n \n
\n

A set of options which specify how to determine if a UrlTree is active, given the UrlTree\nfor the current router state.

\n\n \n
\n \n \n
\n\ninterface IsActiveMatchOptions {\n matrixParams: 'exact' | 'subset' | 'ignored'\n queryParams: 'exact' | 'subset' | 'ignored'\n paths: 'exact' | 'subset'\n fragment: 'exact' | 'ignored'\n}\n\n\n \n \n\n\n \n \n\n
\n\n \n
\n

See alsolink

\n
    \n \n
  • Router.isActive

    \n
  • \n
\n
\n\n\n \n \n \n
\n

Propertieslink

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
PropertyDescription
\n \n matrixParams: 'exact' | 'subset' | 'ignored'\n \n \n

Defines the strategy for comparing the matrix parameters of two UrlTrees.

\n\n

The matrix parameter matching is dependent on the strategy for matching the\nsegments. That is, if the paths option is set to 'subset', only\nthe matrix parameters of the matching segments will be compared.

\n
    \n
  • 'exact': Requires that matching segments also have exact matrix parameter\nmatches.
  • \n
  • 'subset': The matching segments in the router's active UrlTree may contain\nextra matrix parameters, but those that exist in the UrlTree in question must match.
  • \n
  • 'ignored': When comparing UrlTrees, matrix params will be ignored.
  • \n
\n\n
\n \n queryParams: 'exact' | 'subset' | 'ignored'\n \n \n

Defines the strategy for comparing the query parameters of two UrlTrees.

\n\n
    \n
  • 'exact': the query parameters must match exactly.
  • \n
  • 'subset': the active UrlTree may contain extra parameters,\nbut must match the key and value of any that exist in the UrlTree in question.
  • \n
  • 'ignored': When comparing UrlTrees, query params will be ignored.
  • \n
\n\n
\n \n paths: 'exact' | 'subset'\n \n \n

Defines the strategy for comparing the UrlSegments of the UrlTrees.

\n\n
    \n
  • 'exact': all segments in each UrlTree must match.
  • \n
  • 'subset': a UrlTree will be determined to be active if it\nis a subtree of the active route. That is, the active route may contain extra\nsegments, but must at least have all the segements of the UrlTree in question.
  • \n
\n\n
\n \n fragment: 'exact' | 'ignored'\n \n \n
    \n
  • 'exact': indicates that theUrlTree` fragments must be equal.
  • \n
  • 'ignored': the fragments will not be compared when determining if a\nUrlTree is active.
  • \n
\n\n \n
\n
\n \n\n\n \n\n\n
\n
\n\n\n" }