title: How can I check if a mat-menu in Material Angular is open?
body: <p>I'm looking for a way to check if my <code>mat-menu</code> is open so I can add a class to the <code>button</code> that opened it using <code>[ngClass]</code> based on the state of the menu.</p>
  
  <pre><code>&lt;button mat-stroked-button mdbWavesEffect [matMenuTriggerFor]="menu"&gt;Actions&lt;/button&gt;
      &lt;mat-menu #menu="matMenu" [overlapTrigger]="false" panelClass="custom"&gt;
          &lt;a routerLink="/attendence/detail" mat-menu-item&gt;View Attendance&lt;/a&gt;
          &lt;a routerLink="/adherence/detail" mat-menu-item&gt;View Adherece&lt;/a&gt;
          &lt;button mat-menu-item&gt;Edit Agent&lt;/button&gt;
          &lt;button mat-menu-item&gt;Upload photo&lt;/button&gt;
          &lt;button mat-menu-item&gt;Deactivate Agent&lt;/button&gt;
      &lt;/mat-menu&gt;
  </code></pre>