2017-08-16 162 views
0

试图打开一个文件Class not found离子本地文件器2的错误类未找到

.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当我收到错误是使用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

我也试过application/pdf对于PDF文件,没有工作

回答

1

它的工作...问题是在运行应用程序住--livereload

相关问题