title: How to check if mat-sidenav is open or close in angular?
body: <p>I'm trying to change the icon of mat-icon depending on close or open mat-sidenav but unable to find if sidenav is open or close below is my code</p>
  <pre><code>&lt;mat-sidenav appResponsiveMenu mode=&quot;side&quot; opened&gt;
          my menu items list
  &lt;/mat-sidenav&gt;
  </code></pre>
  <p>here is the toggle button</p>
  <pre><code>&lt;button mat-icon-button (click)=&quot;sidenav.toggle()&quot;&gt;
     &lt;mat-icon *ngIf=&quot;sidenav&quot;&gt;keyboard_arrow_left&lt;/mat-icon&gt;
     &lt;mat-icon *ngIf=&quot;!sidenav&quot;&gt;keyboard_arrow_right&lt;/mat-icon&gt;
  &lt;/button&gt;
  </code></pre>
  <p>.ts code</p>
  <pre><code>  @ViewChild(MatSidenav)
    sidenav!: MatSidenav;
  </code></pre>