ng2-validation 在 Angular2 angular-seed 中不起作用

ng2-validation not working in Angular2 angular-seed

我正在尝试集成基于 ng2-validation in my Angular2 angular-seed 的项目。我已按照 ng2-validation 文档中提到的步骤进行操作,但出现以下错误。请在这方面帮助我。

"(SystemJS) Unexpected token <
    SyntaxError: Unexpected token <
        at Object.eval (http://localhost:5555/node_modules/ng2-validation/dist/directives/range-length.js:13:10)
        at eval (http://localhost:5555/node_modules/ng2-validation/dist/directives/range-length.js:43:4)
        at eval (http://localhost:5555/node_modules/ng2-validation/dist/directives/range-length.js:44:3)
    Evaluating http://localhost:5555/node_modules/ng2-validation/dist/
    Evaluating http://localhost:5555/node_modules/ng2-validation/dist/directives/range-length.js
    Evaluating http://localhost:5555/node_modules/ng2-validation/dist/directives.js
    Evaluating http://localhost:5555/node_modules/ng2-validation/dist/index.js
    Evaluating http://localhost:5555/app/app.module.js
    Evaluating http://localhost:5555/app/main.js
    Error loading http://localhost:5555/app/main.js"

将此配置用于 karma.conf.js 中的文件数组:

{
  pattern: 'node_modules/ng2-validators/*.js',
  included: false,
  watched: false
},
{
  pattern: 'node_modules/ng2-validators/**/*.js',
  included: false,
  watched: false
}

基于 ng2-validators 版本,您可以使用 link 中指定的配置:https://github.com/Nightapes/ng2-validators/issues/11