How to close Angular auxiliary route automatically after every primary route change

Viewed 9

I have a sidebar with Auxiliary routes, and I don't want to show the sidebar paths in the URL. So I use the skipLocationChange. But Angular will show the sidebar's route in the URL after every primary route change with routerLink.

I don't want to change every routerLink, and I don't want to add outletName: null for every named outlet in the routerLink manually.

Is there a solution to automatically close the sidebar after every primary route change or permanently hide the named outlet's path in the URL?

0 Answers
Related