Conversation
JeanMeche
force-pushed
the
router-boundary
branch
from
October 1, 2026 13:31
a6fb9c8 to
10bd347
Compare
JeanMeche
force-pushed
the
router-boundary
branch
2 times, most recently
from
October 1, 2026 13:50
1edccd9 to
6a53731
Compare
Introduces error boundary support in the Angular Router, allowing individual routes to declare an `errorComponent` and applications to configure global fallback defaults via `withErrorBoundaries`.
Key Features:
- Route Error Components: Define `errorComponent` on `Route` to render a fallback component when routed components or non-blocking resources fail.
- Input & Route Data Binding: Expose caught error via `readonly error = input<Error>()` on error components with precedence over colliding route parameters, query parameters, or resolvers. Bind path parameters and static data to error components via `withComponentInputBinding()`.
- Deterministic RedirectCommand Handling: Automatically unwrap and dispatch `RedirectCommand` thrown within routed components or resource loaders, with deduplication across nested boundaries.
- Global Error Boundaries: Provide `withErrorBoundaries({ defaultErrorComponent, onError })` for global defaults and monitoring hooks (invoked in the root injection context) without polluting `Router.events`.
- Fail-Safe Fallbacks: Bubble uncaught exceptions inside error components to parent template boundaries or global ErrorHandler.
- Documentation: Add comprehensive guide and reference updates in adev and in-repo design docs.
JeanMeche
force-pushed
the
router-boundary
branch
from
October 1, 2026 13:55
6a53731 to
40986f9
Compare
JeanMeche
commented
Oct 1, 2026
| return this.activated; | ||
| } | ||
| private _activatedRoute: ActivatedRoute | null = null; | ||
| // TODO: Consider whether the error boundary feature should offer a way to recover from an error |
Member
Author
There was a problem hiding this comment.
We'll keep it as a todo for now.
|
Deployed adev-preview for ad8ec6a to: https://ng-dev-previews-fw--pr-angular-angular-71117-adev-prev-3xmiom00.web.app Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt. |
JeanMeche
force-pushed
the
router-boundary
branch
from
October 1, 2026 14:44
40986f9 to
ad8ec6a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces error boundary support in the Angular Router, allowing individual routes to declare an
errorComponentand applications to configure global fallback defaults viawithErrorBoundaries.Key Features:
errorComponentonRouteto render a fallback component when routed components or non-blocking resources fail.readonly error = input<Error>()on error components with precedence over colliding route parameters, query parameters, or resolvers. Bind path parameters and static data to error components viawithComponentInputBinding().RedirectCommandthrown within routed components or resource loaders, with deduplication across nested boundaries.withErrorBoundaries({ defaultErrorComponent, onError })for global defaults and monitoring hooks (invoked in the root injection context) without pollutingRouter.events.