I am trying to use ng2-file-upload in my app in this common way.
In my module.
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);
});
As a result, I am always getting this error.
Error: Unexpected value 'undefined' imported by the module 'AppModule'
But all js files downloaded correctly. I also tried index.js, bundles/ng2-file-upload.umd.js nothing works. Could you help me please?