本文介绍了在Ionic App中创建自定义弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在我的Ionic应用程序中创建自定义弹出窗口,我尝试使用Ionic CSS进行修改以完全满足我的要求,但没有成功.请帮助我或建议我,如果有任何我可以编辑并完全满足我要求的第三方CSS.

I try to create custom Popup in my Ionic App, I try to modify using Ionic CSS in to full fill my requirement but don't get success. Please help me or suggest me if any third party CSS available which i can edit and full fill my requirement.

建议的设计

推荐答案

看看ionic ModalController ,它可用于创建自定义弹出窗口以及自定义模板,而不是自定义 Alert Controller .您要做的就是使用 ionic生成页面< pageName> 创建一个普通的ionic页面,然后使用 ModalController 填充模板并将弹出窗口呈现给用户.阅读线程以创建完整灵活弹出符合您要求的弹出窗口.是您可以添加的方式动画制作模型.

Have a look at ionic ModalController it can be used to create custom popup along with custom template rather customizing Alert Controller. All you have to do is create a normal ionic page using ionic generate page <pageName> then using ModalController inflate the template and present the pop up to user. Read this thread to create full flexed pop up that match up your requirement. This is how you can add animation to models.

constructor(public modalCtrl: ModalController) {
}

let profileModal = this.modalCtrl.create(Profile);
profileModal.present();

这篇关于在Ionic App中创建自定义弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 23:25