Skip to main content

angular material - How to change Badge position

app.component.html

<h2 style="padding-top:25px; padding-bottom:50px;">
  Angular Material - How to change Badge position
</h2>


<span 
  matBadge="7"
  matBadgeOverlap="false"
  matBadgeSize="large"
  matBadgePosition="after">
    Badge position after
</span>

<br/><br/><br/>

<span 
  matBadge="7"
  matBadgeOverlap="false"
  matBadgeSize="large"
  matBadgePosition="before">
    Badge position before
</span>
app.module.ts [import]

import { MatBadgeModule } from '@angular/material/badge'
More Angular tutorials