Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
User interface 旋转器警报_User Interface_Ionic Framework_Ionic2_Alert_Uialertcontroller - Fatal编程技术网

User interface 旋转器警报

User interface 旋转器警报,user-interface,ionic-framework,ionic2,alert,uialertcontroller,User Interface,Ionic Framework,Ionic2,Alert,Uialertcontroller,我想在副标题中显示带有微调器的警报,如: 我试过,但没有成功: this.alertCtrl.create({ title: 'Verificando', subTitle: '<ion-spinner name="dots"></ion-spinner> foo bar' }); this.alertCtrl.create({ 标题:'核查', 副标题:“富吧” }); 有什么想法吗?不幸的是,爱奥尼亚2的AlertController在默认情况下不提

我想在副标题中显示带有微调器的警报,如:

我试过,但没有成功:

this.alertCtrl.create({
   title: 'Verificando',
   subTitle: '<ion-spinner name="dots"></ion-spinner> foo bar'
});
this.alertCtrl.create({
标题:'核查',
副标题:“富吧”
});

有什么想法吗?

不幸的是,爱奥尼亚2的AlertController在默认情况下不提供在title/subtitle属性中嵌入HTML代码的方法。此警报是否仅在加载内容时使用? 在这种情况下,我建议您使用LoadingController组件,使用LoadingController可以插入html嵌入代码作为内容属性

例如,在本例中,我在类
.sp.sp slices
上创建了一个自定义CSS动画,并将其插入到名为loadingCtrl的LoadingController变量中:

this.loading = this.loadingCtrl.create({
            spinner: 'hide',
            content: '<div class="sp sp-slices"></div>'
          });
this.loading.present();
this.loading=this.loadingCtrl.create({
微调器:“隐藏”,
内容:“”
});
this.loading.present();
使用此选项将为您提供足够的灵活性,以调整LoadingController组件,使其看起来与您所需的完全相同

爱奥尼亚2还提供了其他LoadingController设计,更接近Android iOS和Windows Phone的本机默认外观。值得一看他们的API文档:

你能显示你的模板吗?我使用了
加载Ctrl
警报Ctrl
,在点击背景时显示提示警报。如果用户单击“是”,我的订阅将被取消;如果用户单击“否”,我的订阅将重新运行。