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
relative routing to a route with empty path causes weird urls and breaks the routing eventually #35687
relative navigation to a route with empty path causes the url to contain additional /() on the next navigation. In some constelations undefined can also appear in the url. When the user then does some more navigating, at some point the route won't recognize the url anymore and the app breaks.
I found out why stackblitz and my app throw differrent errors. My app is served with a base href and stackblitz isn't. If you inspect the link in the stackblitz reproduction after step 2, the href is "//(lazy)".
changed the title [-]relative routing over lazy route boundaries causes weird urls and breaks the routing eventually[/-][+]relative routing to a route with empty path causes weird urls and breaks the routing eventually[/+]on Mar 2, 2020
I found out that it hasn't anything to do with lazy loading, so I updated the issue text above. The problem seems to be a relative navigation to a route with empty path.
Activity
saithis commentedon Feb 27, 2020
I found out why stackblitz and my app throw differrent errors. My app is served with a base href and stackblitz isn't. If you inspect the link in the stackblitz reproduction after step 2, the href is "//(lazy)".
[-]relative routing over lazy route boundaries causes weird urls and breaks the routing eventually[/-][+]relative routing to a route with empty path causes weird urls and breaks the routing eventually[/+]saithis commentedon Mar 2, 2020
I found out that it hasn't anything to do with lazy loading, so I updated the issue text above. The problem seems to be a relative navigation to a route with empty path.
martinsik commentedon Mar 29, 2020
Issue is still present in Angular 9.1.0: https://stackblitz.com/edit/angular-lazy-route-relative-bug-fjhdin?file=src%2Fapp%2Fapp.module.ts
atscott commentedon May 28, 2020
also related: #13011
Also note that
{relativeLinkResolution: 'corrected'}does not resolve this issue.atscott commentedon May 29, 2020
Additional repro from #30437 without lazy loading: https://stackblitz.com/edit/relative-link-eager-loading
fix(router): Fix relative link generation from empty path components (#…
fix(router): Fix relative link generation from empty path components (a…
angular-automatic-lock-bot commentedon Jul 10, 2020
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.
fix(router): Fix relative link generation from empty path components (a…