Closed vijender1256 closed 7 years ago
fixed this issue with following setting in systemjs.config.json:
/**
* System configuration for Angular 2 samples
* Adjust as necessary for your application needs.
*/
(function (global) {
System.config({
paths: {
// paths serve as alias
'npm:': 'build/lib/js/'
},
//map tells the System loader where to look for things
map: {
// our app is within the app folder
app: 'build/dist/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',
"ng2-pagination": "npm:ng2-pagination",
'ng2-webstorage': 'npm:ng2-webstorage',
'angular2-modal': 'npm:angular2-modal',
'angular2-modal/plugins/bootstrap': 'npm:angular2-modal/bundles/angular2-modal.bootstrap.umd.js'
},
// 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'
},
"ng2-pagination": { main: "index.js", defaultExtension: "js" },
'ng2-webstorage': { main: 'bundles/core.umd.js', defaultExtension: 'js' },
'angular2-modal': { defaultExtension: 'js', main: '/bundles/angular2-modal.umd.js' }
}
});
})(this);
When Trying to get angular2-modal working, I am getting below error: ( I am using angular "~2.1.1")
Below is my system.config.js file:
And here is my app.module.ts file:
What is the issue ?, is it a bug that will be fixed ?