【发布时间】:2020-01-22 23:01:24
【问题描述】:
我在 Angular 项目中正式使用 https://www.npmjs.com/package/formdata-polyfill 和 nxg 我的表单有一个正式配置的文件上传字段。现在我们必须支持 IE,并且需要一个 polyfill 才能使其工作,但我不知道如何添加它。错误是 IE 不支持 FormData.get,需要 polyfill。
polyfills.ts
...
import 'formdata-polyfill';
form.component.ts
...
this.fields = [
{
key: 'file',
id: 'field_import_file',
type: 'file-upload',
templateOptions: {
required: true,
fieldName: 'Import File',
floatLabel: 'always',
appearance: 'outline'
},
validation: {
validators: ['file-upload']
}
}
];
【问题讨论】:
标签: angular internet-explorer polyfills ngx-formly