Angular - secondary router outlet stays in URL when navigating to new tab/window

66 views Asked by At

I have a problem with angulars secondary router outlets (named outlets - https://angular.io/guide/router-tutorial-toh#displaying-multiple-routes-in-named-outlets).

The issue I am facing is that whenever a named outlet is active Ex.:http://myRoute1(popup:myRoute2) and then I try to navigate to another route trought routerLink with ctrl/shift modifiers (new tab/window)... the named outlet just stays in the URL.

Ex.: [routerLink]="['myOtherRoute']" produces an URL of http://myOtherRoute(popup:myRoute2) in new window/tab.

Is there any way to omit this behaviour whitout writing custom URL serializer and then navigating trough window?

EDIT: I forgot to point out that I DO want this behaviour when navigating inside the same tab!

SUMMARY:

Solution like this deleted answer is not acceptable:

enter image description here

0

There are 0 answers