angularjs – “关闭”一个模态和“关闭”一个模态在Angular UI-Bootstrap之间的区别是什么?

前端之家收集整理的这篇文章主要介绍了angularjs – “关闭”一个模态和“关闭”一个模态在Angular UI-Bootstrap之间的区别是什么?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
关闭”模态和“关闭”模态之间的区别是什么?
close(result) - a method that can be used to close a modal,passing a result
dismiss(reason) - a method that can be used to dismiss a modal,passing a reason
答案在文档中,紧接着你引用的两行:

The open method returns a modal instance,an object with the following properties:

@H_301_10@
  • close(result) – a method that can be used to close a modal,passing a result
  • dismiss(reason) – a method that can be used to dismiss a modal,passing a reason
  • result – a promise that is resolved when a modal is closed and rejected when a modal is dismissed
  • 这里的重要位置是承诺发生了什么。关闭,承诺被解决 – 本质上,“成功”回调触发。在关闭时,promise被拒绝,因此运行“failure”回调。

    原文链接:https://www.f2er.com/angularjs/146608.html

    猜你在找的Angularjs相关文章