本文介绍了如何使用AngularJS在禁用的按钮上启用Bootstrap工具提示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在禁用的按钮上显示工具提示,如果使用AngularJS启用了工具提示,则将其删除.
I need to display a tooltip on a disabled button and remove it if it is enabled using AngularJS.
推荐答案假设您正在使用angular-ui-bootstrap:
Assuming you're using angular-ui-bootstrap:
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在禁用的按钮上启用Bootstrap工具提示?
发布评论