'Headers' is undefined in IE11

杀马特。学长 韩版系。学妹 提交于 2020-01-14 03:38:06

问题


I am using angular2csv where I export the data displayed in the table to csv. I add the headers using ,

  export() {
    const head = ['Header1', 'Header2', 'Header3', 'Header4', 'Header5'];
    const exportErrors = new Angular2Csv(this.items,
      this.obj.value, { headers: (head) });
  }

It works fine in CHROME, but on IE11, it gives me an error saying 'ERROR ReferenceError: 'Headers' is undefined'. What is the issue here?

What is the alternative to headers in IE11.


回答1:


I just encountered this on a different (non-angular) project. I beleive the best solution is the whatwg-fetch polyfill.

The underlying issue is that IE does not implement the full Fetch spec



来源:https://stackoverflow.com/questions/47534859/headers-is-undefined-in-ie11

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!