-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Labels
P2The issue is important to a large percentage of users, with a workaroundThe issue is important to a large percentage of users, with a workaroundarea: coreIssues related to the framework runtimeIssues related to the framework runtimearea: routerbugcore: deferIssues related to @defer blocks.Issues related to @defer blocks.core: distate: has PR
Milestone
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
17.2.1
Description
A RouterLink with a route of ./ should route to the activated route. (eg. <a [routerLink]="'./'" >Link One</a>). But when it is in a defer block, and it is a sibling of a component that imports from material it routes to the app root.
So
@defer(on timer(1000)) { <has-material/> <a [routerLink]="'./'" >Link One</a> } routes to the root.
Reproduction
StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-prh2zk
Steps to reproduce:
- Have a RouterLink in a defer block that has a relative route
- Give it a sibling that imports from Material
Expected Behavior
The router link route should be relative to the current route.
Actual Behavior
The router link route is from the root. The 'ActiveRoute' seems to be incorrect.
Environment
- Angular: >= 17.2.4
- CDK/Material: 17.2.2
- Browser(s): edge, chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2The issue is important to a large percentage of users, with a workaroundThe issue is important to a large percentage of users, with a workaroundarea: coreIssues related to the framework runtimeIssues related to the framework runtimearea: routerbugcore: deferIssues related to @defer blocks.Issues related to @defer blocks.core: distate: has PR
