API 在 ionic 2 中加载响应时如何设置 "dots" 加载程序?

How to set "dots" loader when API loads a response in ionic 2?

我在 ionic 2 应用程序中,我可以在 html 页面上添加微调器作为 <ion-spinner name="dots"></ion-spinner> 但想在 API 响应的等待时间内设置 "dots" 微调器。

当前响应等待加载程序代码是:

 fnPresentLoading() {
     this.loading = this.loadingCtrl.create({
     content: 'Please wait...'
     });
   this.loading.present();

有人知道吗?? 目前它显示默认微调器。

您需要一个 spinner 参数并将 'dots' 传递给它

this.loading = this.loadingCtrl.create({
  spinner: 'dots',
  content: 'Please wait...'
});