( handler: (error: NavigationError) => unknown | RedirectCommand, )
| 720 | * @publicApi |
| 721 | */ |
| 722 | export 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`. |
searching dependent graphs…