【发布时间】:2015-07-24 12:17:03
【问题描述】:
我正在尝试 Ionic 部署。似乎一切正常,直到获得更新后再次加载应用程序。我提供了截图。如果还有什么我可以提供的,请告诉我。谢谢。
应用完成下载和解压后控制台出错,然后它会尝试再次加载。
我的网页视图出错
部署脚本中加载方法的离子源代码
我的 javascript 实现:
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if(window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
screen.lockOrientation('portrait');
}
if(window.StatusBar) {
StatusBar.styleDefault();
}
// Check for updates
$ionicDeploy.check().then(function(response) {
hide();
console.log(response);
// response will be true/false
if (response) {
show('Downloading update...');
// Download the updates
$ionicDeploy.download().then(function() {
hide();
show('Extracting update...');
// Extract the updates
$ionicDeploy.extract().then(function() {
hide();
// Load the updated version
$ionicDeploy.load();
}, function(error) {
show('Error extracting new update...');
setTimeout(function(){
hide();
}, 1500);
// Error extracting
}, function(progress) {
show('Extract progress...' + progress);
// setTimeout(function(){
// hide();
// }, 5000);
// Do something with the zip extraction progress
// $scope.extraction_progress = progress;
});
}, function(error) {
show('Error downloading...');
setTimeout(function(){
hide();
}, 1500);
// Error downloading the updates
}, function(progress) {
show('Download progress...' + progress);
// setTimeout(function(){
// hide();
// }, 5000);
// Do something with the download progress
// $scope.download_progress = progress;
});
}
},
function(error) {
// Error checking for updates
show('Error checking for updates');
setTimeout(function(){
hide();
}, 1500);
});
});
})
【问题讨论】:
标签: ionic-framework ionic