How to use Badge from angular material?

1.1K    Asked by VictoriaMartin in Python , Asked on Feb 3, 2020
Answered by Victoria Martin

We need to import MatBadgeModule in order to use it.

import {




} from '@angular/material';


  exports: [






export class MaterialModule { }

Also, we need to import the theme style of angular/material in styles.css.

@import '~@angular/material/prebuilt-themes/deeppurple-amber.css';

After that we can use it like this:

Text with a badge

Your Answer


Parent Categories