app.component.html
<h2 style="padding-top:25px; padding-bottom:25px;">
Angular Material -
How to toggle Expansion Panel expanded state
</h2>
<h3>
Expansion Panel is now :
{{panel.expanded? 'Expanded' : 'Collapsed'}}
</h3>
<button
mat-raised-button
(click)="panel.toggle()"
color="primary">
Toggle Expanded State
</button>
<br/><br/>
<mat-expansion-panel #panel>
<mat-expansion-panel-header>
<mat-panel-title>Spring</mat-panel-title>
</mat-expansion-panel-header>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Integer vitae semper massa. Donec maximus, dui nec
dignissim blandit, ante odio varius ex,
nec volutpat erat justo ac magna.
</mat-expansion-panel>
app.module.ts [import]
import {MatExpansionModule} from '@angular/material/expansion'
- angular material - Action bar inside an Expansion Panel
- angular material - How to use Accordion flat display mode
- angular material - Open & close Expansion Panel on button click
- angular material - Determine an Expansion Panel is opened or closed
- angular material - Determine an Expansion Panel is disabled or enabled
- angular material - Initially expand a panel in Accordion
- angular material - Expansion Panel expandedChange event
- angular material - How to change Expansion Panel header height
- angular material - How to use List
- angular material - List items separator
- angular material - How to generate List items from array
- angular material - Navigation list with button and icon
- angular material - How to use Action List
- angular material - Action list with button and icon
- angular material - How to use Selection List