有谁能告诉我如何在angular 4项目中将angular2-signaturepad包添加到SystemJS.config文件中。我没有得到它的主文件?
以下是systemjs.config文件,包名称是angular2-signaturepad。
/**
* System configuration for Angular samples
* Adjust as necessary for your application needs.
*/
(function (global) {
System.config({
paths: {
// paths serve as alias
'npm:': 'https://unpkg.com/'
},
// map tells the System loader where to look for things
map: {
// our app is within the app folder
app: 'app',
// angular bundles
'@angular/animations': 'npm:@angular/animations/bundles/animations.umd.js',
'@angular/animations/browser': 'npm:@angular/animations/bundles/animations-browser.umd.js',
'@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/animations': 'npm:@angular/platform-browser/bundles/platform-browser-animations.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/router/upgrade': 'npm:@angular/router/bundles/router-upgrade.umd.js',
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
'@angular/upgrade': 'npm:@angular/upgrade/bundles/upgrade.umd.js',
'@angular/upgrade/static': 'npm:@angular/upgrade/bundles/upgrade-static.umd.js',
'ng2-auto-complete': 'npm:ng2-auto-complete/dist/ng2-auto-complete.umd.js',
'ng2-bootstrap-modal': 'npm:ng2-bootstrap-modal',
'angular2-busy': 'npm:angular2-busy',
'file-saver':'npm:file-saver',
// other libraries
'rxjs': 'npm:rxjs',
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js'
},
// packages tells the System loader how to load when no filename and/or no extension
packages: {
app: {
main: './app.main.js',
defaultExtension: 'js',
},
rxjs: {
defaultExtension: 'js',
main: 'Rx.js'
},
'ng2-bootstrap-modal': {
main: 'index.js',
defaultExtension: 'js'
},
'angular2-busy': {
main: './index.js',
defaultExtension: 'js'
}
}
});
})(this);
请告诉我如何在地图和包装下添加angular2-signaturepad,就像我添加了其他包一样。另外,我尝试按如下方式添加它 在地图下:
'angular2-signaturepad':'npm:angular2-signaturepad'
在包裹下:
'angular2-signaturepad': {
main: './index.js',
defaultExtension: 'js'
}
但是由于找不到“localhost:3000 / signature_pad”,它会抛出错误 任何帮助将不胜感激。