Angular 2 Material Design Expand All / Collapse All
Answer : 1- You should remove the mat-accordion to enable multiple expanded panels. 2- Use the expanded parameter to change multiple states at the same time. Here is a running example. EDIT From version 6.0.0-beta-0 you can use multi parameter and the openAll and closeAll functions : 1- Change the mat-accordion element to set the muti to true and get the MatAccordionComponent instance : <mat-accordion #accordion="matAccordion" [multi]="true"> 2- Then use the openAll and closeAll functions to open or close all panels : <button (click)="accordion.openAll()">Expand All </button> <button (click)="accordion.closeAll()">Collapse All </button> Here is a running example. Source Link For the latest version of Angular material 8 Template <button mat-flat-button color="primary" (click)="openAllPanels()"><b>Open Panels</b></button> ...