离子4:通过{的代码:5创建文件,消息:“ ENCODING_ERR”}

时间:2019-06-06 10:11:06

标签: angular file ionic4 writefile

我正在尝试创建一个新的.xml文件,但由于编码错误而出现错误

请找到以下我尝试过的代码

  this.file.writeFile(this.file.externalApplicationStorageDirectory, "sample.xml",data)
  .then((success)=>{
    console.log("success of xml ",success);
  }, (error)=>{
    console.log("error of xml ", error);
  })
  .catch((error) => {
    console.log("catch error of xml ",JSON.stringify(error));
  })
}```




//Actually i need to create a file xml file I am getting error as {code: 5 , message:"ENCODING_ERR"}

0 个答案:

没有答案