我需要在禁用的按钮上显示工具提示,如果它是使用 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/