2016-10-20 7 views
3

ng2-validationをAngular2 angular-seedベースのプロジェクトに統合しようとしています。私はng2検証文書に記載されている手順に従ってきましたが、次のエラーが発生しています。この点で私を助けてください。Angular2角度シードでng2検証が機能しない

"(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" 

答えて

0

使用karma.conf.jsであなたのファイルのアレイのこの構成:

{ パターンは: '*// NG2-バリデータをnode_modules JS'、 が含ま:偽、 は見て:偽 は}、{ パターン: 'node_modules/NG2-バリ/ **/* jsの'、 が含ま:偽は、 は見て:偽 }

をNG2-バリのバージョンに基づいて、あなたはconfiguratiを使用することができますリンクに指定されている通り:https://github.com/Nightapes/ng2-validators/issues/11

関連する問題