I've set up an angular material card that includes a close button (marked with an "x").
My goal is to initially hide the "x" button and only display it when hovering over the card.
Here is the code snippet for the card:
<mat-card>
<mat-card-title>hello title</mat-card-title>
<mat-card-content>hello content</mat-card-content>
<mat-card-actions>
<button mat-icon-button><mat-icon>close</mat-icon></button>
</mat-card-actions>
</mat-card>
I considered using ngClass
, but I wasn't sure how to indicate whether the user is currently hovering over the card or not.