Open loganfreeman opened 8 years ago
This is a systemJS configuration things.
Look at the demo (index.systemjs.html), see how package is configured by setting a main file.
I'll try to make a more coherent version of config object for system JS.
Basically, in Webpack, index
files are automatically resolved inside a directory.
In system JS we need to specifically set them.
This is more commonly known as barrels.
See material2
config section, they set the main explicitly for every angular module including platform specific modules.
I'm using systemJS and as @shlomiassaf said, I've added
var packages = { ...other_stuff, 'angular2-modal/platform-browser': { defaultExtension: 'js', main: 'index.js' } };
and error disappeared
I found I have to import like:
if I just do:
It would throw error like: