3

我正在使用Angular 2 See d 应用程序并尝试安装 KendoUI Angular2 控件。

种子使用 SystemJS,但在npm start. 我尝试使用 from 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'
    };
4

1 回答 1

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。我无法让它在配置文件或组件文件中工作。

于 2016-11-07T23:09:58.180 回答