You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Named outlets of lazy loaded modules in auxiliary routes do not work聽#26964
Named routes of lazy loaded modules which are loaded as part of an auxiliary route in another lazy loaded module do not work. Empty routes work correctly.
Note that named and unamed outlets for non-lazy loaded modules in LazyModule1 work correctly, as does the unnamed route in LazyModule2. The named route in LazyModule2, when accessed through the auxilliary route in LazyModule1 however, does not.
In the example, the problem link is the second link in the list titled "Lazy content with parameters".
馃敟 Exception or Error
errors.ts:35 ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'lazy1/1/2'
馃實 Your Environment
7.0.1
I searched for other issues and found some others that are similar to this setup (such as #24562) but are not exactly the same. The workaround for that issue is also unsuitable for my use case, as I need to be able to reroute the auxiliary outlet without changing the primary route.
@joshualouisjenson I checked that stackblitz and it actually started working after changing lazy2-routes.ts:10 from path: ':paramA:paramB' to path: ':paramA/:paramB' (this is the url you are actually redirecting to in PortalComponent) 馃帀
@joshualouisjenson I have created a package that is suppose to be a workaround for named router outlets in lazy modules. Please have a look at it and hope it helps. : )
Activity
henrique-barreto commentedon Dec 12, 2018
Very annoying bug!!! For years, other issues about this bug were created and closed, but the problem persist.
TGC79 commentedon Jan 23, 2019
Duplicate of #10726 which should be reopened since the fix for it was reverted.
Issue was first reported on Angular 2.0.0-rc.5.
lincolnthree commentedon Jun 6, 2019
Still having this issue in Angular 8. Having trouble finding a workaround. Looking into CDK portals but... that adds a lot of complications.
superdyzio commentedon Jun 24, 2019
@joshualouisjenson I checked that stackblitz and it actually started working after changing
lazy2-routes.ts:10frompath: ':paramA:paramB'topath: ':paramA/:paramB'(this is the url you are actually redirecting to inPortalComponent) 馃帀Jonathan002 commentedon Jul 20, 2019
@joshualouisjenson I have created a package that is suppose to be a workaround for named router outlets in lazy modules. Please have a look at it and hope it helps. : )
Repo Link: https://github.com/Jonathan002/route-master-example
angular-automatic-lock-bot commentedon Sep 15, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.