ionic解压
$scope.unZipFile = function () {var src = cordova.file.externalDataDirectory+"11.zip";
var dest = cordova.file.externalDataDirectory+"ldjc";
//var src = "http://127.0.0.1:8080/ionic/testfiles/11.zip";
//var dest = "http://127.0.0.1:8080/ionic/testfiles/";
$cordovaZip.unzip(
src,
dest
).then(function () {
console.log('success');
$scope.succMsg = "success";
}, function (err) {
console.log('error');
$scope.errMsg = "error:"+err;
}, function (progressEvent) {
// https://github.com/MobileChromeApps/zip#usage
$scope.downloadProgress = progressEvent;
});
};
使用cordova-plugin-zip插件解压文件,总是失败,不知道什么原因,有没有哪位大神使用过
页:
[1]