我正在使用Angular 2 See d app并尝试安装KendoUI Angular2控件。
种子使用SystemJS,但是在npm start
上生成。我试图使用here添加外部依赖,但我无法使其工作。
我得到了
Failed to load resource: the server responded with a status of 404 (Not Found)
localhost/:47 Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:5555/node_modules/@progress/kendo-angular-inputs.js(…) "Report this error at https://github.com/mgechev/angular2-seed/issues"
以下是我尝试添加到/tools/config/project.config.ts
this.SYSTEM_CONFIG_DEV.paths['@progress/kendo-angular-inputs'] =
`node_modules/@progress/kendo-angular-inputs`;
this.SYSTEM_BUILDER_CONFIG.packages['@progress/kendo-angular-inputs'] = {
main: './dist/npm/js/main.js',
defaultExtension: 'js'
};
答案 0 :(得分:0)
我的路径有点偏。这修好了
this.SYSTEM_CONFIG_DEV.paths['@progress/kendo-angular-dialog'] =
`${this.APP_BASE}node_modules/@progress/kendo-angular-dialog/dist/npm/js/main`;
this.SYSTEM_BUILDER_CONFIG.packages['@progress/kendo-angular-dialog'] = {
main: '/dist/npm/js/main',
defaultExtension : 'js'
};
您需要将样式引用添加到index.html。我无法在配置文件或组件文件中使用它。