How to programatically trigger a tooltip to show in Angular 2/4?

Viewed 3833

I have a tooltip "Hello" I want to show when I (click) on a button. Was looking at this: https://swimlane.github.io/ngx-ui/#tooltip and other tooltip libraries, but all seem to require use of the dom, and doesn't programatically open and close.

In angular 1, you can do something like this: http://plnkr.co/edit/QeQqqEJAu1dCuDtSvomD?p=preview

<!-- Popover can be controller by the following checkbox -->
<label>
  <input type="checkbox" ng-model="isOpen">
  show popover?
</label>

<br>

<!-- isOpen is a $scope variable -->
<span popover="Hello!" 
      popover-toggle="isOpen"
      popover-placement="bottom">
  Popover below
</span>

Is there a library/way I can do this with Angular2? (if ngx-ui tooltip is unable to do this) I am using bootstrap and the library referenced above for my tooltips. If there is another library of some kind or some way I can do this, that would be great.

1 Answers
Related