当前位置:网站首页>ionic中的$ionicPopup连续两个调用alert时需要注意的事项
ionic中的$ionicPopup连续两个调用alert时需要注意的事项
2022-07-28 16:27:00 【梁毅】
$ionicPopup.alert();返回的是一个promise,再执行的时候其实是异步执行。所以当连续调用两个ionic中的alert时就要注意了,不然就会出现点击按钮之后遮罩层不消失,弹出框不消失等情况。$ionicPopup.alert()调用之后会返回一个promise,我们可以在这个里面执行。
代码可以参考下面:
var alertPopup=$ionicPopup.alert({ title: '提示', template: "弹出第一alert!" }); alertPopup.then(function(res) { var alertPopup2=$ionicPopup.alert({ title: '提示', template: "弹出第二alert!" }); alertPopup2.then(function(res) { alertPopup.close(); }); });
边栏推荐
- Uparse rich text style of uni app
- 面试官:算法刷题实录.pdf我居然答不上来
- Andthen of function interface
- AMQP protocol details
- Selection and application of inductors in high speed circuits
- [atlas] atlas compilation error sorting (all)
- Kubernetes service and ingress you need to master
- influxdb2的使用
- 线性代数及矩阵论(八)
- Basic principle of asynchronous FIFO (simple implementation based on Verilog)
猜你喜欢

Verilog 每日一题 (VL5 信号发生器)

SNAT、DNAT 防火墙规则的备份和还原

The practice of the beego framework of goweb development: Section II project initialization configuration

mysql实现按照自定义(指定顺序)排序

Gray code and binary conversion and typical examples (4bits gray code counter)

Verilog 每日一题 (VL28 加减计数器)

AMQP protocol details

Redis源码剖析,狠狠地拿捏了,赶紧码住

Verilog 每日一题(VL29 单端口RAM)

MySQL数据库增删改查(基础操作命令详解)
随机推荐
The practice of beego framework developed by goweb: Section 4 database configuration and connection
[CDH] configure CDH components through clouderamanager and collect JMX information with Prometheus monitoring
掌握JVM面试专题和答案Offer拿到手软(附学习路线图)
Mysql database addition, deletion, modification and query (detailed explanation of basic operation commands)
MySQL download update
Janus series article 3 API usage guide videoroom creating a new video room
[atlas] atlas compilation error sorting (all)
Role of Fortress machine
高速电路设计实践——概述
Verilog 每日一题(VL29 单端口RAM)
@Requestparam use
Verilog 每日一题 (VL24 多bit MUX同步器 跨时域输出)
Editor MAVON editor for offline use
MySQL详细学习教程(建议收藏)
循环中使用switch在执行条件后使用break和continue的区别
Encrypt the video and upload it to OSS to achieve high concurrent access
【ansible】ansible shell 执行远程命令遇到awk 中$符号的问题
线性代数及矩阵论(十)
带参数的微信小程序二维码生成
Verilog daily question (vl27 settable counter)