angularjs - 如何使用 AngularJS 在禁用按钮上启用 Bootstrap 工具提示?

标签 angularjs angular-ui-bootstrap

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

最佳答案

假设您使用的是 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>

关于angularjs - 如何使用 AngularJS 在禁用按钮上启用 Bootstrap 工具提示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40147535/

相关文章:

angularjs - Bootstrap 模式中的文本输入未触发 ng-change 事件

javascript - 如何在 AngularJS 中上传多个文件

javascript - 无法读取未定义的 Angular 工厂的属性

css - Bootstrap 中的网格系统

angularjs - Angular UI Carousel 的 `track by $index` 问题

javascript - AngularJS、Gulp 静态资源修改

javascript - 如何解决大内容的 Angular 性能问题

javascript - ui bootstrap 模式在单击背景时未关闭

javascript - 如何在 ng-repeat 中添加类

css - 带有 Bootstrap 警报的 Angularjs - 向下滚动时在屏幕上保持警报