如何使用AngularJS启用禁用按钮上的Bootstrap Tooltip?

Anu*_*wal 2 angularjs angular-ui-bootstrap

我需要在禁用按钮上显示工具提示,如果使用AngularJS启用它,则将其删除.

Fis*_*sio 7

假设你正在使用angular-ui-bootstrap:

http://plnkr.co/edit/vA7sizeDWwyC7KxeuGel?p=preview

<body ng-controller="MainCtrl" ng-app="plunker">
  <div style="height:100px"></div>
  <div uib-tooltip="asdsad" tooltip-enable="disableButton" style="display:inline-block">
    <button ng-disabled="disableButton" ng-style="{'pointer-events':disableButton ? 'none' : ''}">Hover over me!</button>
  </div>
  <br>Check the checkbox to disable the button <input type="checkbox" ng-model="disableButton">
</body>
Run Code Online (Sandbox Code Playgroud)