当前位置:网站首页>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 daily question (vl27 settable counter)
- Asynchronous circuit design -- principle and example of synchronous pulser
- Andthen of function interface
- Verilog daily question (vl26 simple stopwatch)
- How do we do full link grayscale on the database?
- 我为什么选择使用Go语言?
- Flat data to tree
- 堡垒机的作用
- AMQP protocol details
- Verilog daily question (vl14 vending machine 1 -- FSM common question types)
猜你喜欢

Export word according to the template, generate compound format tables and variable column tables

Zero foundation uses unity3d to develop AR applications and download 3D models remotely

Verilog 每日一题(VL26 简易秒表)

Vscode界面介绍

Linear algebra and matrix theory (IX)

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

高速电路设计实践——概述

Basic principle of asynchronous FIFO (simple implementation based on Verilog)

Selection of resistance in high speed circuit

Shell脚本之AWK
随机推荐
MySQL download update
异步电路设计--同步脉冲器原理及例题
@Requestparam use
Verilog 每日一题(VL26 简易秒表)
net框架
Redis source code analysis, hold it hard, and code it quickly
mysql实现按照自定义(指定顺序)排序
【presto】presto 常用的命令
阿里P8架构师谈:成为架构师必须学好的七大知识点(含面试题)
高速电路中电阻的选择
Linear algebra and matrix theory (VIII)
Verilog 每日一题(VL6 数据串转并电路)
MySQL详细学习教程(建议收藏)
Andthen of function interface
Visual Studio 2012/2015发布Web应用连同.cs源码一起发布
C language to achieve minesweeping games
The actual combat of the beego framework of goweb development: Section III program execution process analysis
Verilog 每日一题(VL29 单端口RAM)
【atlas】atlas 编译报错整理(全)
部分情况下Error:(xx, xx) Failed to resolve: xxxxxx解决。