Ionic 3 - LoadingController.present()需要很长时间才能呈现

时间:2017-10-26 19:30:17

标签: javascript angular ionic3

当我正在调用这样的加载弹出窗口时:

send(message): void {
   // calling a provider of alerts
   this.loadingProgress("open", false, message.destinatarios.length);
   var messageList = [];
   var clientes = [];

   for (var i = 0; i < message.destinatarios.length; i++) {
      //sincronous operations 
   }

   for (var j = 0; j < clientes.length; j++) {
      //asyncronous operations
   }
}

loadingProgress(action, navPage, total) {
   this.load = this.loadingController.create({
      content: 'Aguarde... ',
      spinner: 'ios',
      dismissOnPageChange: navPage //se permanecer na mesma tela -> false
  });
  this.load.present();
}

问题是加载屏幕需要超过15秒才能弹出。
我想知道调用ascyncronous操作是否与它有关...

0 个答案:

没有答案