Ich implementierte den Deploy-Dienst zu meiner ionischen App (ich verwende ionic 1) und es funktioniert gut, jetzt möchte ich den Benutzern die verbleibende Zeit für den Download oder vielleicht einen Fortschrittsbalken so zeigen Sie denken nicht, dass die App friert. unten ist die Funktion der deployIonic 1 Bereitstellungsdienst Fortschrittsbalken
var deployFunction = function() {
$ionicDeploy.check().then(function(snapshotAvailable){
if (snapshotAvailable) {
// When snapshotAvailable is true, you can apply the snapshot
MainService.startSpinner("Downloading Updates");//this shows a loading image indicating that the download started
//applying the snapshot
$ionicDeploy.download()
.then(
function() {
MainService.stopSpinner();
MainService.startSpinner("Extracting");
$ionicDeploy.extract()
.then(
function(){
MainService.stopSpinner();
$ionicDeploy.load();
}, function(error) {
console.log("ERROR EXTRACT "+error);
// Error extracting
}, function(progress) {
// progress of extracting
console.log('extraction progress '+progress);
}
);
}, function(error){
//download error
console.log("ERROR Downloading "+error);
}, function(progress) {
//download progress
console.log('download progress '+progress);
}
);
}
});
}
ich irgendwo gelesen habe, dass die Fortschrittsfunktion für eine ganze Zahl zurückgeben sollte ... ist es aber nicht, und ich habe keine Ahnung, wie neben, dass Informationen über den Download zu erhalten es ist gestartet oder es ist beendet. jede mögliche Hilfe würde
das hat die Arbeit getan. Vielen Dank –