Repository navigation
fix(router): Fix _lastPathIndex in deeply nested empty paths - #22394
adriensamson wants to merge 3 commits into
Conversation
|
@adriensamson This pull request appears to effect named outlet. using RouterLink in a named outlet makes the URL (../../) and not up a level correctly. It appears only to go up on the routing tree. However it does fix the issue regarding primary routes |
6df8127 to
42b2c6d
Compare
|
Any news ? |
|
Please, please, please merge this. I do not understand how something as fundamental as relative navigation can be left broken for years. The Angular docs even recommend using pathless routes like this, and they do not work properly!? |
42b2c6d to
0ff8773
Compare
|
@adriensamson I know this has been sitting a while, but I'm taking a look at it. My concern is that, while this is a bug fix, it will break apps that are currently using the extra I went ahead and added the flag, and we will remove that in Thanks a lot for the fix. This should make relative routing much less confusing for users. |
|
Just for my curious, has the named-outlet issue mentioned by @Jordan-Hall been solved? |
|
@adriensamson please rebase so that it can land in |
|
One more note, since @jasonaden refactored this to a flag in the router, shouldn't this be a |
5f0b70e to
e4d8f74
Compare
|
Thank you @jasonaden for your help. |
|
@jasonaden @adriensamson This patch does not apply cleanly on the 6.0.x branch and the PR is marked as master + patch (6.0.x). What I would suggest is to mark this PR as master only and create a new PR for 6.0.x with the conflicts resolved. They would both be merged at the same time. Makes sense ? |
|
@vicb I'll work with you on merging this one to make sure the rebase is clean. |
|
merge-assistance: wainting on the PR for the patch branch to be ready before merging |
|
I can't tell if this is in 6.0.x or not. Was the patch trashed? |
|
@marcwhitbread It's not in 6.0.x, since it touches the public API. |
|
@sarunint thanks for the reply. I apologize in advance for another stupid question... How would i find out what version received this pr? 6.1? 7? |
|
It's 6.1. |
|
Added #25609 to make this the default for Angular 7. |
|
Seems to be broken in Angular 7: #26983. I don't see how other recent changes could possibly interfere with this. |
|
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. |


PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
See #13011 (comment) and #13011 (comment)
When an empty path is deeply nested, its _lastPathIndex is too high and relative nagivation to its parent needs lot of additional '../'
Issue Number: #13011
What is the new behavior?
_lastPathIndex (computed from _segmentIndexShift) is correct and relative navigation works as expected
Does this PR introduce a breaking change?
Other information