Is there a way for me to toggle between two buttons: OpenAll and CloseAll?
Can I determine the state of mat-accordion, whether it is fully opened or closed, using a boolean value?
<div class="row">
<mat-icon *ngIf="accordion.open()" (click)="accordion.openAll()">open_in_full</mat-icon>
<mat-icon *ngIf="!accordion" (click)="accordion.closeAll()">close_fullscreen</mat-icon>
</div>
<div class="message-box row" *ngIf="notes.length; else noResult">
<mat-accordion multi>
<mat-expansion-panel *ngFor="let note of notes" [expanded]="0">
<mat-expansion-panel-header>
<mat-panel-title class="col-6">
{{note.title}}
</mat-panel-title>
<mat-panel-description class="col-6">
{{note.created | date:'dd.MM.yyyy'}}
</mat-panel-description>
</mat-expansion-panel-header>
<p>{{note.note}}</p>
</mat-expansion-panel>
</mat-accordion>