-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(router): support lazy loading for empty path named outlets #38379
Conversation
380893e
to
f1c97e2
Compare
71a6595
to
ac00cdd
Compare
ac00cdd
to
39a8403
Compare
196bf2f
to
fe12333
Compare
angular#38379)" This reverts commit 68e36dc.
…ar#38379) In general, the router only matches and loads a single Route config tree. However, named outlets with empty paths are a special case where the router can and should actually match two different `Route`s and ensure that the modules are loaded for each match. This change updates the "ApplyRedirects" stage to ensure that named outlets with empty paths finish loading their configs before proceeding to the next stage in the routing pipe. This is necessary because if the named outlet has `loadChildren` but the associated lazy config is not loaded before following stages attempt to match and activate relevant `Route`s, an error will occur. fixes angular#12842 PR Close angular#38379
angular#38379)" This reverts commit 7ad3264.
In general, the router only matches and loads a single Route config tree. However, named outlets with empty paths are a special case where the router can and should actually match two different `Route`s and ensure that the modules are loaded for each match. This change updates the "ApplyRedirects" stage to ensure that named outlets with empty paths finish loading their configs before proceeding to the next stage in the routing pipe. This is necessary because if the named outlet has `loadChildren` but the associated lazy config is not loaded before following stages attempt to match and activate relevant `Route`s, an error will occur. fixes angular#12842
1333aee
to
0a52656
Compare
@alxhub PTAL The internal failure was due to a stack overflow caused by the
This has the added benefit of loading all matched outlets concurrently. Additionally, the |
c9e6957
to
a46f081
Compare
a46f081
to
ac2d84d
Compare
…ar#38379) In general, the router only matches and loads a single Route config tree. However, named outlets with empty paths are a special case where the router can and should actually match two different `Route`s and ensure that the modules are loaded for each match. This change updates the "ApplyRedirects" stage to ensure that named outlets with empty paths finish loading their configs before proceeding to the next stage in the routing pipe. This is necessary because if the named outlet has `loadChildren` but the associated lazy config is not loaded before following stages attempt to match and activate relevant `Route`s, an error will occur. fixes angular#12842 PR Close angular#38379
angular#38379)" This reverts commit 7ad3264.
hi guys, any update on that? Stuck with this issue and need this PR |
@danylobilokha it’s available in the v11 release, currently 11.0.0-next.2 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
In general, the router only matches and loads a single Route config tree. However,
named outlets with empty paths are a special case where the router can
and should actually match two different
Route
s and ensure that themodules are loaded for each match.
This change updates the "ApplyRedirects" stage to ensure that named
outlets with empty paths finish loading their configs before proceeding
to the next stage in the routing pipe. This is necessary because if the
named outlet has
loadChildren
but the associated lazy config is not loadedbefore following stages attempt to match and activate relevant
Route
s,an error will occur.
fixes #12842
global presubmit - Will want to do another rerun as I made a tiny change since then to pass the test "should work work with redirects when other outlet comes before the one being activated"