UI的引导,对话框关闭 [英] Ui-bootstrap-dialog closing

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

问题描述

要关闭模式窗口,应该调用函数modal.close(结果)。

To close modal window one should call function modal.close(result).

close(result) - a method that can be used to close a modal, passing a result

什么是结果吗?

What is result here?

之间有什么密切的(真),关闭(假),关闭('夸夸其谈')>

What is the difference between close(true), close(false), close('blah-blah')>

推荐答案

假设你关闭该模式具有的的东西的:

Assuming you close the modal with something :

close(something)

您可以得到这样的的东西的在承诺 $ modalInstance.result

You can get this something in the promise $modalInstance.result:

$modalInstance.result.then(function (something) { 
    // ... 
}

请参阅UI的引导模式 文档 plunker 作为参考。

See ui-bootstrap modal documentation and plunker for reference.

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

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