如何防止 angular-ui 模式关闭? [英] How do I prevent angular-ui modal from closing?
本文介绍了如何防止 angular-ui 模式关闭?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的项目中使用 Angular UI $modalhttp://angular-ui.github.io/bootstrap/#/modal
I am using Angular UI $modal in my project http://angular-ui.github.io/bootstrap/#/modal
我不希望用户通过按下背景来关闭模式.我想要一个模式只能通过按下我创建的关闭按钮来关闭.
I don't want user to close the modal by pressing on backdrop. I want a modal can only be closed by pressing close button which I have created.
如何防止模态关闭?
推荐答案
在创建模态时,您可以指定其行为:
While you creating your modal you can specify its behavior:
$modal.open({
// ... other options
backdrop : 'static',
keyboard : false
});
这篇关于如何防止 angular-ui 模式关闭?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文