I have a mat-icon
and a mat-badge
on it containing a number.
I'm looking for removing the mat-badge
only if the number is <=0
.
I did *ngIf
on the entire mat-icon
, the result its obvious, it remove both mat-icon
and mat-badge
.
Here is the code
<mat-icon matBadge="{{matBadge}}" class="icon">shopping_cart</mat-icon>