【发布时间】:2023-03-17 22:54:01
【问题描述】:
我正在尝试以这种常用方式在我的应用中使用 ng2-file-upload。
在我的模块中。
import { FileUploadModule } from 'ng2-file-upload';
在 systemjs 配置中。
map: {
...
'ng2-file-upload': '/static/node_modules/ng2-file-upload',
...
},
packages: {
'ng2-file-upload': {
main: 'ng2-file-upload.js',
defaultExtension: 'js'
}
}
})
SystemJS.import('main.js').then(function(m){
}, function(error){
console.log(error);
});
因此,我总是收到此错误。
Error: Unexpected value 'undefined' imported by the module 'AppModule'
但是所有的js文件都正确下载了。 我还尝试了 index.js、bundles/ng2-file-upload.umd.js 没有任何效果。 你能帮帮我吗?
【问题讨论】:
标签: angular systemjs ng2-file-upload