app.component.html
<h2 style="padding-top:25px; padding-bottom:25px;">
Angular Material -
How to open and close Expansion Panel on button click
</h2>
<div style="margin-bottom:25px;">
<button
mat-raised-button color="primary"
(click)="panel.open()">
Open Panel
</button>
<button
mat-raised-button color="warn"
(click)="panel.close()">
Close Panel
</button>
</div>
<mat-expansion-panel #panel>
<mat-expansion-panel-header>
<mat-panel-title>Laravel</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 - How to use Slider input event
- angular material - How to use Slide toggle
- angular material - How to get Slide toggle checked status
- angular material - How to change Slide toggle checked color
- angular material - How to use Badge with text
- angular material - How to change Badge position
- angular material - How to toggle Badge visibility
- angular material - How to use Accordion
- angular material - How to use Expansion Panel
- angular material - Action bar inside an Expansion Panel
- angular material - Expansion Panel opened & closed event
- angular material - How to use Accordion flat display mode
- angular material - Determine an Expansion Panel is opened or closed
- angular material - Determine an Expansion Panel is disabled or enabled
- angular material - How to toggle Expansion Panel expanded state