I want to show a tooltip when i click an icon, not by hovering on it.
<a title="Tooltip">
<i class="fa fa-info-circle"></i>
</a>
I also want to be able to customize to the tooltip with some classes like:
<div class="a-tooltip a-tooltip--top-right">
This is my tooltip text!
</div>
My try:
<a (click)="tooltip.toggle()"
#tooltip="matTooltip"
matTooltip="test"
aria-label="Button that displays a tooltip when focused or hovered over">
<i class="fa fa-info-circle"></i>
</a>
This does however not show a tooltip on clicking. In app.module.ts i have:
import { MatTooltipModule } from '@angular/material';
@NgModule({
declarations: [
...
],
imports: [
MatTooltipModule
]
})