Open ssashok10 opened 7 years ago
is there any systemjs.config.js sample that i can refer?. I am getting compile time errors once i upgrade to "2.0.2"
Error TS2306 File 'I:/git/sample/node_modules/angular2-modal/index.d.ts' is not a module. TypeScript Virtual Projects
Below is my systemjs.config.js file which is working fine with "2.0.0-beta.11".
(function (global) {
System.config({
paths: {
// paths serve as alias
'npm:': 'node_modules/'
},
// map tells the System loader where to look for things
map: {
// our app is within the app folder
'app': 'app',
// angular bundles
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
// other libraries
'rxjs': 'npm:rxjs',
'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api',
'angular2-modal': 'node_modules/angular2-modal'
},
// packages tells the System loader how to load when no filename and/or no extension
packages: {
'app': {
main: './main.js',
defaultExtension: 'js'
},
'rxjs': {
defaultExtension: 'js'
},
'angular2-in-memory-web-api': {
main: './index.js',
defaultExtension: 'js'
},
'lib': {
format: 'register',
defaultExtension: 'js'
},
'angular2-modal': {
defaultExtension: 'js',
main: 'bundles/angular2-modal.umd'
},
// Some internal directories in angular2-modal are barrel like (having index.ts)
// this works great with webpack, with systemJS it needs mapping.
'angular2-modal/esm/providers': { defaultExtension: 'js', main: 'index' },
'angular2-modal/esm/overlay': { defaultExtension: 'js', main: 'index' },
'angular2-modal/esm/components': { defaultExtension: 'js', main: 'index' },
// Plugins also need mappings.
'angular2-modal/plugins/bootstrap': { defaultExtension: 'js', main: 'index' },
'angular2-modal/plugins/vex': { defaultExtension: 'js', main: 'index' },
'angular2-modal/plugins/js-native': { defaultExtension: 'js', main: 'index' }
}
});
})(this);
I am using version "2.0.0-beta.11" on my application and it works fine. I tried to upgrade to "2.0.2" and i am getting the below error message,
"node_modules/angular2-modal/index.d.ts" is not a module.
Is there any working sample that i can get it from you to implement custom dialogs with version 2.0.2?