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

Function withErrorBoundaries

packages/router/src/provide_router.ts:1013–1022  ·  view source on GitHub ↗
(options: ErrorBoundaryOptions = {})

Source from the content-addressed store, hash-verified

1011 * @developerPreview 22.3
1012 */
1013export function withErrorBoundaries(options: ErrorBoundaryOptions = {}): ErrorBoundariesFeature {
1014 const providers = [
1015 {
1016 provide: ROUTER_ERROR_BOUNDARY_HANDLER,
1017 useFactory: () =>
1018 new ErrorBoundaryHandler(inject(Router), inject(EnvironmentInjector), options),
1019 },
1020 ];
1021 return routerFeature(RouterFeatureKind.ErrorBoundariesFeature, providers);
1022}
1023
1024/**
1025 * A type alias that represents all Router features available for use with `provideRouter`.

Callers 2

Calls 2

injectFunction · 0.90
routerFeatureFunction · 0.85

Tested by 1