Hello, I have the following configuration setting for systemJS:
System.config({
packages: {
//sets the root path of the Angular2 App
'DesktopModules/RegentDMS/app': {
//module format expected in application, register = System.register or System.registerDynamic compatibility module format
format: 'register',
//default file extension for paths
defaultExtension: 'js',
map: {'./app' : './DesktopModules/RegentDMS/app'}
},
}
});
System.import('app/boot')
.then(null, console.error.bind(console));
The default extension works fine, but I get a 404 error in the console, which reads:
GET http: // localhost: 81 / app / boot 404 (not found)
But if I change it to the following:
System.config({
packages: {
//sets the root path of the Angular2 App
'DesktopModules/RegentDMS/app': {
//module format expected in application, register = System.register or System.registerDynamic compatibility module format
format: 'register',
//default file extension for paths
defaultExtension: 'js'
},
}
});
System.import('/DesktopModules/RegentDMS/app/boot.js')
.then(null, console.error.bind(console));
Then it works.
Question:
how to configure the MAP option so that I can use the short application / reference the absolute path to DesktopModules / RegentDMS / app in import operations like app / boot (which means DesktopModules / RegentDMS / app / boot. JS)
thanks
EDIT # 1:
So I changed. / app on the application, as suggested, and tried both of the following:
map: { 'app': './DesktopModules/RegentDMS/app' }
map: { app: './DesktopModules/RegentDMS/app' }
and this does not work when using any of the following import statements:
System.import('app/boot')
System.import('./app/boot')
:
http://localhost:81/app/boot 404 ( )
:
:
System.config({
packages: {
//sets the root path of the Angular2 App
'DesktopModules/RegentDMS/app': {
//module format expected in application, register = System.register or System.registerDynamic compatibility module format
format: 'register',
//default file extension for paths
defaultExtension: 'js'
}
},
map: { 'app': './DesktopModules/RegentDMS/app' }
});
System.import('app/boot')
.then(null, console.error.bind(console));