Enables error boundary support in the Router.
@returns
ErrorBoundariesFeatureDescription
Enables error boundary support in the Router.
When enabled, router outlets become error boundaries. If the route or feature defines an
errorComponent, it is rendered in place of the failed component, receiving the caught error
through an error input.
Usage Notes
bootstrapApplication(AppComponent, {
providers: [
provideRouter(
appRoutes,
withErrorBoundaries({
defaultErrorComponent: GlobalErrorComponent,
}),
),
],
});
Jump to details