tooltipRef property

  1. @Input('for')
set tooltipRef (TooltipTarget? target)

The element at which this tooltip is targeted.

This is typically set in the template by using a var ref. For example:

  <span tooltipTarget #target="tooltipTarget">Tip</span>
  <material-tooltip-text [for]="target">My tooltip</material-tooltip-text>

Implementation

@Input('for')
set tooltipRef(TooltipTarget? target) {
  if (target == null) return;
  _tooltipSource = target;
  target.setTooltip(tooltipHandle);
}