2017-08-16 61 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

相關問題