uib-popover在外部单击时未关闭 [英] uib-popover not closing on outside click
本文介绍了uib-popover在外部单击时未关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Angular UI Bootstrap Popover,但是我无法通过单击外部按钮将其关闭.我正在使用outsideClick触发器(popover-trigger ="outsideClick")为什么不起作用?
I´m using the Angular UI Bootstrap Popover, but I´m unable to get it to close on outside click. I´m using the outsideClick trigger (popover-trigger="outsideClick") Why is this not working?
<button uib-popover-template="'myPopoverTemplate.html'"
popover-placement="right"class="btn btn-default"
popover-trigger="outsideClick">Click Me</button>
这适用于ui-bootstrap 1.x.x(例如1.3.3).2.x.x不支持吗?
This works with ui-bootstrap 1.x.x (e.g. 1.3.3). Is this not supported in 2.x.x?
推荐答案
这是因为在ui-bootstrap 2.x.x上您必须执行以下操作:
It's because on ui-bootstrap 2.x.x you have to do :
popover-trigger="'outsideClick'">Click Me</button>
或使用
$scope.myTrigger = "outsideClick" then
popover-trigger="myTrigger">Click Me</button>
感谢@AngularPlayer
Thanks to @AngularPlayer
这篇关于uib-popover在外部单击时未关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文