几年前开发ionic时遇到的问题,当时在stackoverflow上找到的解决方案,记录下:
In @ionic/[email protected], when a modal layer is opened by modalController, and another modal layer is opened in it, and then the latter is closed, there will be a problem: a translucent mask layer will be displayed on the screen (backdrop). Upgraded to @ionic/[email protected], this problem was solved.
But in @ionic/[email protected](and @ionic/[email protected] ) there is another new problem: when opening another modal in one modal and closing the latter, ionic will push the componennt page of the second Modal into the navigation stack, the browser address has also changed. In the end, I can only solve it with the following code temporarily:
this.modalControll.dismiss().then(()=> this.navController.pop());
翻译:
@ionic/[email protected],当用modalController打开一个模态层,并在其中打开另一个模态图层,然后关闭后者时,会出现一个问题:屏幕(背景)上将显示半透明的遮罩层。升级到@ionic/[email protected],这个问题得到了解决。
但在@ionic/[email protected](和@ionic/[email protected] )中还有另一个新问题:当在一个模态中打开另一个模态并关闭后者时,ionic会将第二个模态的组件页推送到导航堆栈中,浏览器地址也发生了变化。最后,我只能暂时用以下代码来解决它:
this.modalControll.disse().then(() => this.navControll.pop());
标签:模态,5.1,窗口,ionic5,modal,problem,ionic,angular From: https://www.cnblogs.com/johnjackson/p/17361003.html