我在更新到RC6后运行应用程序时遇到了一些问题.
由于官方示例from changelog,我改变了我的systemjs.
但我仍然得到像这样的编译错误:
“模块”“D:/ Myproject / WebClient / node_modules / @ angular / router / index”’没有导出的成员’ROUTER_DIRECTIVES’.“
看起来编译器采用默认的index.js文件而不是umd包…编译是通过gulp任务完成的,具有以下选项:
“模块”:“系统”,
“moduleResolution”:“节点”,
“目标”:“ES5”,
“experimentalDecorators”:是的,
“emitDecoratorMetadata”:是的,
“allowSyntheticDefaultImports”:false
我得到路由器模块和表单模块的这个错误.
Router为V3.0.0-rc.2,格式为V.2.0.0-rc6
认为无论如何我的systemJs无法正确读取更是一个问题.
SystemJS:
var map = { 'app': 'public/app','@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','rxjs': 'npm:rxjs','symbol-observable': 'npm:symbol-observable','moment': 'npm:moment','ng2-charts': 'npm:ng2-charts','ng2-translate/ng2-translate': 'npm:ng2-translate','angular2-highcharts': 'npm:angular2-highcharts','highcharts/highstock.src': 'npm:highcharts','primeng': 'npm:primeng' }; var packages = { 'app': { main: 'main',defaultExtension: 'js' },'rxjs': { main: 'Rx.js','moment': { main: 'moment',defaultExtension: 'js',type: 'cjs'},'symbol-observable': { main: 'index.js','ng2-charts': { main: 'ng2-charts','ng2-translate/ng2-translate': { main: 'ng2-translate','angular2-highcharts': { main: 'index','highcharts/highstock.src': { main: 'highstock.src','primeng': { defaultExtension: 'js' }s }; System.config({ map: map,packages: packages,paths: { // paths serve as alias 'npm:': 'node_modules/' } //format: 'register' });
艾恩有什么想法吗?
提前致谢