I'm using named outlets to show a sidebar. Works fine:
<a [routerLink]="['/', {outlets: {sidebar: 'profile'}}]">
Open sidebar
</a>
I also have a link which closes the sidebar. Also works fine:
<a [routerLink]="['/', {outlets: {sidebar: null}}]">
Close
</a>
Here's the problem. I want to have a third link, which links to a contacts route AND closes the sidebar. I tried doing this:
<a [routerLink]="['/contacts', {outlets: {sidebar: null}}]">
Contacts
</a>
But nothing happens when I click that third link.
How can I navigate to another route and simultaneously remove a named outlet?