W3cubDocs

/Angular

RunGuardsAndResolvers

type-alias

A policy for when to run guards and resolvers on a route.

See more...

type RunGuardsAndResolvers = 'pathParamsChange' | 'pathParamsOrQueryParamsChange' | 'paramsChange' | 'paramsOrQueryParamsChange' | 'always' | ((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);

See also

Description

Guards and/or resolvers will always run when a route is activated or deactivated. When a route is unchanged, the default behavior is the same as paramsChange.

paramsChange : Rerun the guards and resolvers when path or path param changes. This does not include query parameters. This option is the default.

  • always : Run on every execution.
  • pathParamsChange : Rerun guards and resolvers when the path params change. This does not compare matrix or query parameters.
  • paramsOrQueryParamsChange : Run when path, matrix, or query parameters change.
  • pathParamsOrQueryParamsChange : Rerun guards and resolvers when the path params change or query params have changed. This does not include matrix parameters.

© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/router/RunGuardsAndResolvers