2016-10-04 36 views
0

如何显示加载应用程序内浏览器页面时的加载? 我尝试使用这种方法:Cordova插件(应用程序内浏览器)

ref.addEventListener('loadstart', function(event) { 
     ionicLoaderService.show(); 
}) 

但装载弹出窗口位于浏览器的后面。

回答

1

我使用这种方法。这不是100%我正在寻找,但看起来不错。 它会首先显示加载弹出窗口,并等待页面加载完成后才会显示浏览器。

ref.addEventListener('loadstart', function(event) { 
     ionicLoaderService.show(); 
}); 

ref.addEventListener('exit', function(event) { 
     ionicLoaderService.hide(); 
}); 

ref.addEventListener('loadstop', function(event) { 
     ref.show(); 
     if (event.url.match("result")) { 
       accountCreditService.updateLocalBalance() 
       ref.close(); 
     } 
}); 
相关问题