尝试打开文件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
是使用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文件,但无效
答案 0 :(得分:2)
它的工作......问题出在运行app --livereload