From angular docs :
The router's link directive always treats the provided input as a delta to the current URL.
For example, if the current URL is /user/(box//aux:team) . Then the following link <a [routerLink]="['/user/jim']">Jim</a> will generate the link /user/(jim//aux:team) .
So how do you create a link to /user/jim ?
I tried ['/user/jim', { outlets: { aux: null }}] but this does not work.
Even if it worked, it would not be the best solution. I'm more likely looking for a way to go to an absolute URL than canceling the exit points.
EDIT:
For the same question, I have a link to the root: routerLink="/" , which does just that, it redirects to the root of my application without any dots, such as an absolute link. What's funny here, I donβt really want this behavior for this particular link, while preserving any route routes, to be fine ...
source share