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>
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