Kendoui Angular2使用Angular 2 Seed安装404s

时间:2016-11-02 04:05:01

标签: angular dependency-injection systemjs kendo-ui-angular2 angular2-seed

我正在使用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'
    };

1 个答案:

答案 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。我无法在配置文件或组件文件中使用它。