Ionic2 loader.present查询

Ionic2 loader.present查询,ionic2,Ionic2,我用的是Ionic2。我正在使用LoadingController,比如 this.loader = this.loadingCtrl.create({ content: "Please wait, creating new test...", }); this.loader.present(); 之后,在某个函数中,我使用this.loader.disclose() 我想知道在loader.discouse之后,是否有任何方法可以检查loader是否存在,例如loader.prese

我用的是Ionic2。我正在使用LoadingController,比如

this.loader = this.loadingCtrl.create({
    content: "Please wait, creating new test...",
});
this.loader.present();
之后,在某个函数中,我使用
this.loader.disclose()

我想知道在loader.discouse之后,是否有任何方法可以检查loader是否存在,例如
loader.present==true


谢谢

您有一个
ondiddisclesh()
函数

可以设置布尔值:

this.loader = this.loadingCtrl.create({
    content: "Please wait, creating new test...",
});
let isShowingLoading:boolean=true;

this.loader.onDidDismiss(()=>isShowingLoading=false);
this.loader.present()

检查

我不明白..一旦它被取消,加载程序对象就不能再使用..你必须创建一个新的加载程序Hi Suraj,你能帮我回答这个关于无限滚动的问题吗?