I would like to click on the span element once, so that the tooltip appears and then again to hide.
Here is my html. What am I doing wrong?
<span mdTooltip="Tooltip!" (click)="tooltip.toggle()>Test</span>
Template reference variable should help you to accomplish that:
<span matTooltip="Tooltip!" #tooltip="matTooltip" (click)="tooltip.toggle()">Test</span>
See also
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With