-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Description
I'm submitting a ... (check one with "x")
[X ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
A routed component cannot use a relative path to navigate to another component; whether from the primary changing the named router outlet, or from a named router changing the primary.
The issue is written up here.
The closest routerLink syntax to navigating to a new named router outlet component is:
<a [routerLink]="['', {outlets: {aux: ['details']}}]">Details</a>
However, when a routed component is already in the aux named route, this routerLink produces an extra set of parenthesis.
auth/portfolio/(home/1//aux:details)(aux:details)
If a routed component isn't already in the aux named route, then the url generated is malformed anyway.
auth/portfolio/(home/1)(aux:details)
Expected behavior
I would expect to be able to change to another route via a routerLink like the documentation says, regardless of the depth I am in the URL tree.
Minimal reproduction of the problem with instructions
https://plnkr.co/edit/uoUBG6yDfNb6P0oLKN16?p=preview
What is the motivation / use case for changing the behavior?
We have an application where the named router outlet is used to display lists of entities. Upon selecting an entity, the application replaces the primary router outlet with the details of the entity. Entity details control which lists are available, so navigation occurs in the primary router outlet to change which component is showing in the named router outlet.
Please tell us about your environment:
Azure App Services
-
Angular version: 2.4.7
https://unpkg.com/@angular/router@3.4.7/bundles/router.umd.js -
Browser:
Chrome 56 -
Language: [all | TypeScript X.X | ES6/7 | ES5]
-
Node (for AoT issues):
node --version=