0

I receive error when trying to open a file Class not found

.ts

open(){
  this.platform.ready().then(() => {
   this.fileOpener.open(this.entry.nativeURL, this.attachment.mime).then(() => {
    console.log('file opened')
   }, err => {
    console.log('error open file: ', err)
  });
 });
}

this.entry.nativeURL is the download result using File Transfer

nativeURL: file:///storage/emulated/0/Download/someFile.docx

this.fileTransfer.download(url, this.storageDirectory + this.attachment.fileName, trustAllHosts).then((entry) => {
 console.log('entry: ', entry);
 this.entry = entry;
}

this.attachment.mime: application/vnd.openxmlformats-officedocument.wordprocessingml.document

I also tried application/pdf for a pdf file , didn't work

Yasir
  • 1,391
  • 2
  • 23
  • 44

1 Answers1

3

Its working... the problem was in running the app live --livereload

Yasir
  • 1,391
  • 2
  • 23
  • 44