title: How to toggle mat-expansion-panel with button click?
body: <p>Is there any way in which I can expand a particular mat-expansion-panel by clicking an external button?</p>
  
  <p>I have tried linking to the ID of the panel, but with no success...</p>
  
  <pre><code>&lt;mat-expansion-panel id="panel1"&gt; ... &lt;/&gt;
  ...
  &lt;button (click)="document.getElementById('panel1').toggle()&gt;Click me&lt;/button&gt;
  </code></pre>
  
  <p><a href="https://stackblitz.com/edit/toggle-expansion-with-button" rel="noreferrer">Here is my stackblitz code for example</a></p>
  
  <p><strong>My eventual plan is to use this method to open different panels within a list generated from an array: <code>&lt;mat-expansion-panel *ngFor="let d of data"&gt; ...</code></strong></p>