Hi
How can i use fileopener2 plugin to open an pdf file from an url ?
I set the example from http://ngcordova.com/docs/plugins/fileOpener2/
And i do get the message: TypeError: Cannot read property ‘open’ of undefined.
I check the cordova plugin list and it is installed :
io.github.pwlin.cordova.plugins.fileopener2 1.0.11 “File Opener2”
$scope.openPDF = function(url, $cordovaFileOpener2) {
var url = "http://www.somewebservice.com/?param1=formparam1¶m2=formparam2";
$cordovaFileOpener2.open(
'url',
'application/pdf',
{
error : function(e) {
console.log('Error status: ' + e.status + ' - Error message: ' + e.message);
},
success : function () {
console.log('file opened successfully');
}
}
);
});