title: angular material mat-accordion on click event top scroll in not working
body: <p>Angular Material -  while click the expansion panel header will call the onExpand function in that time window scroll  to top (or) change the position  not working</p>
  
  <pre class="lang-js prettyprint-override"><code>onExpand(){
      window.scrollTo(0,0);
  }
  </code></pre>
  
  <pre class="lang-html prettyprint-override"><code>&lt;mat-accordion&gt;
    &lt;mat-expansion-panel class="Alert" [expanded]="false" #Completed&gt;
      &lt;mat-expansion-panel-header (click)="Completed.expanded?onExpand():onCollapse()"&gt;
        &lt;mat-panel-title&gt;
          &lt;span&gt;
                      &lt;span *ngIf="!Completed.expanded"&gt;&lt;img id="Alrtimg" src="assets/img/app/completed_expand.png"&gt;&lt;/span&gt;
          &lt;span *ngIf="Completed.expanded"&gt;&lt;img id="Alrtimg" src="assets/img/app/completed_collapse.png"&gt;&lt;/span&gt;
          &lt;/span&gt;
          &lt;span class="AltMsgtxt"&gt;Completed&lt;/span&gt;
        &lt;/mat-panel-title&gt;
      &lt;/mat-expansion-panel-header&gt;
  
      &lt;mat-card *ngFor="let alrt of alerts" style="display: inline-block;border:0.6px solid #80808063;"&gt;
  
        &lt;div fxLayout="row wrap" fxLayoutAlign="space-between center"&gt;
          &lt;div fxFlex.gt-sm="100" fxFlex.gt-xs="100" fxFlex="100" fxFlex.gt-md="100"&gt;
            &lt;p class="nudge_title"&gt;{{alrt.nudge_entity_name}}&lt;/p&gt;
            &lt;p class="nudge_amount"&gt;{{alrt.nudge_amount | currency:"INR":'symbol':'1.0-0'}}&lt;/p&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div fxLayout="row wrap" fxLayoutAlign="space-between center" style="padding: 0px 0px 18px 0px;"&gt;
          &lt;div fxFlex.gt-sm="100" fxFlex.gt-xs="100" fxFlex="100" fxFlex.gt-md="100"&gt;
            &lt;mat-progress-bar mode="determinate" value="40"&gt;&lt;/mat-progress-bar&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div fxLayout="row wrap" fxLayoutAlign="space-between center"&gt;
          &lt;div fxFlex.gt-sm="100" fxFlex.gt-xs="100" fxFlex="100" fxFlex.gt-md="100"&gt;
            &lt;p class="AlertDescr"&gt;{{alrt.nudge_msg}}&lt;/p&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/mat-card&gt;
    &lt;/mat-expansion-panel&gt;
  &lt;/mat-accordion&gt;
  </code></pre>