当前位置:网站首页>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(); }); });
边栏推荐
- Verilog 每日一题(VL2 异步复位的串联T触发器--牛客网)
- MySQL download update
- 技术面轻松通过,HR:只有三年大厂经验的不值20K
- mysql实现按照自定义(指定顺序)排序
- [CDH] configure CDH components through clouderamanager and collect JMX information with Prometheus monitoring
- Self study examination in April 2021
- With a total data volume of more than trillions of lines, Yuxi cigarette factory can easily deal with it by correctly selecting the timing database
- Differences between CNSA and CASC and CASIC
- 我为什么选择使用Go语言?
- Valarray Library Learning
猜你喜欢

【impala】【报错解决】 Impala cannot read or execute the parent directory of dfs.domain.socket.path的解决方法

AMQP protocol details
![[atlas] atlas compilation error sorting (all)](/img/bb/2ca51dffc7a09b378be4e581280246.png)
[atlas] atlas compilation error sorting (all)

Visual studio 2012/2015 releases web applications together with.Cs source code

MySQL detailed learning tutorial (recommended Collection)

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

wpf命令按钮透明样式

MySQL triggers

Shell脚本之免交互操作

LNMP source code compilation and installation
随机推荐
Visual studio 2012/2015 releases web applications together with.Cs source code
C语言实现扫雷小游戏
In some cases, error: (XX, XX) failed to resolve: XXXXXX.
Why do I choose to use go language?
高速电路中电感的选型和应用
线性代数及矩阵论(七)
Verilog 每日一题(VL8 使用generate…for语句简化代码)
Vscode界面介绍
@Requestparam use
The practice of the beego framework for goweb development: Section V project construction and user registration
Verilog 每日一题 (VL28 加减计数器)
【impala】【报错解决】 Impala cannot read or execute the parent directory of dfs.domain.socket.path的解决方法
About standard IO buffers
[Presto] details of the new version upgrade of Presto
Verilog 每日一题(VL14 自动贩售机1--FSM常见题型)
【CDH】通过 ClouderaManager 配置CDH组件用 prometheus 监控采集JMX信息
MySQL implements sorting according to custom (specified order)
Valarray Library Learning
wpf命令按钮透明样式
SNAT、DNAT 防火墙规则的备份和还原