app.component.html
<h2 style="padding-top:25px; padding-bottom:25px;">
Angular Material - How to show Badge in a button
</h2>
<button mat-raised-button
matBadge="8" matBadgePosition="after">
Badge In A Button
</button>
<br/><br/>
<button mat-raised-button
matBadge="8" matBadgePosition="before">
Badge Position Before
</button>
<br/><br/>
<button mat-raised-button
matBadgeSize="large" matBadge="8">
Large Size Badge
</button>
<br/><br/>
<button mat-raised-button
matBadgeColor="warn" matBadge="8">
Badge Color Warn
</button>
<br/><br/>
<button mat-raised-button
matBadgeOverlap="false" matBadge="8">
Badge Not Overlapped
</button>
app.module.ts [import]
import { MatBadgeModule } from '@angular/material/badge'
import { MatButtonModule } from '@angular/material/button'
- angular material - How to use Slider
- angular material - Slider step, minimum & maximum value
- angular material - Tick interval with step in Slider
- angular material - How to invert Slider
- angular material - How to use Slider input event
- angular material - How to use Slide toggle
- 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 show Badge with icon
- angular material - Badge position before & below after
- angular material - Icon inside Expansion Panel header
- angular material - Show Accordion toggle icon on left
- angular material - Open & close Accordion all panels at once