离子本地文件器2的错误类未找到
问题描述:
试图打开一个文件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文件,没有工作
答
它的工作...问题是在运行应用程序住--livereload