Closed theer1k closed 5 years ago
I need an example like this, but using ionic 3, importing with ts e etc:
app = angular.module('MyApp', ['ngCordova.plugins.zeep']) app.controller('MyController', function($scope, $cordovaZeep) { var source = cordova.file.applicationDirectory, zip = cordova.file.cacheDirectory + 'source.zip', extracted = cordova.file.cacheDirectory + 'extracted'; console.log('source : ' + source ); console.log('zip : ' + zip ); console.log('extracted : ' + extracted); console.log('zipping ...'); $cordovaZeep.zip({ from : source, to : zip }).then(function() { console.log('zip success!'); console.log('unzipping ...'); $cordovaZeep.unzip({ from : zip, to : extracted }).then(function() { console.log('unzip success!'); }, function(e) { console.log('unzip error: ', e); }); }, function(e) { console.log('zip error: ', e); }); });
I was able to use this plugin on ionic 3 by adding it and declaring like this:
const zip = (<any>window).Zeep.zip;
I need an example like this, but using ionic 3, importing with ts e etc: