MCPcopy Index your code
hub / github.com/angular/angular / withNavigationErrorHandler

Function withNavigationErrorHandler

packages/router/src/provide_router.ts:722–732  ·  view source on GitHub ↗
(
  handler: (error: NavigationError) => unknown | RedirectCommand,
)

Source from the content-addressed store, hash-verified

720 * @publicApi
721 */
722export function withNavigationErrorHandler(
723 handler: (error: NavigationError) => unknown | RedirectCommand,
724): NavigationErrorHandlerFeature {
725 const providers = [
726 {
727 provide: NAVIGATION_ERROR_HANDLER,
728 useValue: handler,
729 },
730 ];
731 return routerFeature(RouterFeatureKind.NavigationErrorHandlerFeature, providers);
732}
733
734/**
735 * A type alias for providers returned by `withExperimentalAutoCleanupInjectors` for use with `provideRouter`.

Callers 2

Calls 1

routerFeatureFunction · 0.85

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…