MCPcopy Create free account
hub / github.com/angular/angular / withNavigationErrorHandler

Function withNavigationErrorHandler

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

Source from the content-addressed store, hash-verified

726 * @publicApi
727 */
728export function withNavigationErrorHandler(
729 handler: (error: NavigationError) => unknown | RedirectCommand,
730): NavigationErrorHandlerFeature {
731 const providers = [
732 {
733 provide: NAVIGATION_ERROR_HANDLER,
734 useValue: handler,
735 },
736 ];
737 return routerFeature(RouterFeatureKind.NavigationErrorHandlerFeature, providers);
738}
739
740/**
741 * A type alias for providers returned by `withAutoCleanupInjectors` for use with `provideRouter`.

Calls 1

routerFeatureFunction · 0.85

Tested by 1