Scenario
After clicking on Accounts
we want our MatSidenav
to close.
Approach
Create a template variable referencing the MatSidenav
instance:
<mat-sidenav #sidenav>
When the user selects Accounts
close the MatSidenav
instance:
(click)="sidenav.toggle()"