fix(router): support lazy loading for empty path named outlets#38379
fix(router): support lazy loading for empty path named outlets#38379atscott wants to merge 3 commits intoangular:masterfrom
Conversation
380893e to
f1c97e2
Compare
71a6595 to
ac00cdd
Compare
ac00cdd to
39a8403
Compare
196bf2f to
fe12333
Compare
angular#38379)" This reverts commit 68e36dc.
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
Routes 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
loadChildrenbut the associated lazy config is not loadedbefore following stages attempt to match and activate relevant
Routes,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"