0
이 일반적인 방법으로 내 앱에서 ng2 파일 업로드를 사용하려고합니다.각도 4 및 SystemJS로 ng2 파일 업로드
내 모듈에 있습니다.
import { FileUploadModule } from 'ng2-file-upload';
In systemjs config.
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도 번들/ng2-file-upload.umd.js를 사용해 보았습니다. 제발 도와 주실 수 있습니까?
어떤 systemjs 버전을 사용하고 있습니까? 0.20. * 인 경우 "meta" "ng2-file-upload"아래에 다음을 지정해야합니다. { "esModule": true } – Steverob2k
"systemjs": "0.20.19",이 트릭이 작동하지 않습니다. :( – zdimon77