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
Router: Cannot read property 'path' of undefined #27674
@devpreview Thanks for creating a new issue on this. I see there's history on the closed issue, but we typically don't get a chance to go into closed issues so it's much better to just create a new one.
Based on the history here, I'm adding this to be looked at in one of the upcoming iterations. Due to the holidays in the US, it will likely be just after the New Year, but again, thanks for filing this new issue.
constroutes: Routes=[{path: 'user',children : [{path: '',// <-- error because of thiscomponent: UsersComponent,}...morestuffhere...
]}]
My listings use matrix/optional params to store filtering/pagination /users;pageSize=123 by using this.router.navigate(['.', params], {relativeTo: route});
I will return back to old routing structure for now.
Still remains broken in @angular/router 8.0.3 . It's common use case, and there should be a simple way to update optional(matrix) params of current route without clumsy workarounds or redisigning routes hierarchy.
As @paya-cz mentioned, relativeLinkResolution: 'corrected' is the fix for the issue described here. I've opened #37355 to make this option the default.
Activity
jasonaden commentedon Dec 18, 2018
@devpreview Thanks for creating a new issue on this. I see there's history on the closed issue, but we typically don't get a chance to go into closed issues so it's much better to just create a new one.
Based on the history here, I'm adding this to be looked at in one of the upcoming iterations. Due to the holidays in the US, it will likely be just after the New Year, but again, thanks for filing this new issue.
dariobraun commentedon Jan 17, 2019
@jasonaden how would one go about fixing this?
sambaptista commentedon Jan 28, 2019
Interesting bug. I share my usecase in case it could help.
I re-used a component from a project in a new one. Only the routing changed and this bug happened.
Before it was working with following structure :
New structure don't work :
My listings use matrix/optional params to store filtering/pagination
/users;pageSize=123by usingthis.router.navigate(['.', params], {relativeTo: route});I will return back to old routing structure for now.
Filter correctly some listings
giniedp commentedon Mar 7, 2019
Running into the same error when using relative navigation and changing optional params only
cyberiny commentedon Aug 1, 2019
Can anyone tell if this issue has been resolved, please?
sambaptista commentedon Sep 3, 2019
Not yet.
Volodymyr-Mishyn commentedon Nov 15, 2019
Still remains broken in @angular/router 8.0.3 . It's common use case, and there should be a simple way to update optional(matrix) params of current route without clumsy workarounds or redisigning routes hierarchy.
MarkoSulamagi commentedon Dec 30, 2019
Bumping this bug, so the bot wouldn't close it :) Same issue for me on
Angular 8.2.*.paya-cz commentedon Jan 19, 2020
I had the same problem. For me, the issue got resolved after using
relativeLinkResolution: 'corrected'.https://angular.io/api/router/ExtraOptions
eg.:
feat(ui): Bookmark scenarios search filters (#124)
atscott commentedon May 29, 2020
As @paya-cz mentioned,
relativeLinkResolution: 'corrected'is the fix for the issue described here. I've opened #37355 to make this option the default.angular-automatic-lock-bot commentedon Jun 30, 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.