When I put click
event on mat-sidenav-content <mat-sidenav-content (click)="isNavBarOpened=false">
The mat-slide-toggle
inside is not working.
Here is the example
Add $event.stopPropagation() on your mat-slide toggle component so that event will not get bubbled up.
<mat-slide-toggle (click)="$event.stopPropagation()"></mat-slide-toggle>