角UI引导模式 [英] Angular UI Bootstrap modal

查看:123
本文介绍了角UI引导模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我采用了棱角分明的UI引导模式(ui.bootstrap.dialog),我有背景:真放; backdropClick:真的。

I am using Angular UI Bootstrap modal (ui.bootstrap.dialog) and I have backdrop: true & backdropClick: true.

但是,当用户点击从模式走,我想执行不仅接近,但附加功能。

But when user clicks away from the modal, I want to perform not only close but additional functions.

我一直在寻找源头code想我可以覆盖Dialog.prototype._bindEvents,但还没有任何运气这样做。

I was looking at the source code thinking I could overwrite Dialog.prototype._bindEvents but have not had any luck doing it.

我也认为这可能是隐藏在原来的引导模式的事件,但我没能赶上这个活动。

I also think this might be 'hidden' event in original bootstrap modal, but I was not able to catch this event.

有没有办法做定义在背景执行点击功能,以及如何将一气呵成了。

Is there a way to do define a function to execute on backdrop click, and how would one go about it.

谢谢
--MB

Thanks --MB

推荐答案

您可以使用

backdrop: 'static'

在你的选择。像这样的:

in your options. Like this:

var modalInstance = $modal.open({
    templateUrl: 'myModalContent.html',
    controller: 'ModalInstanceCtrl',
    backdrop: 'static',
    ...
});

这篇关于角UI引导模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆