2016-10-09 9 views
0

これは、バーベル、es7などと関係があります。基本的なAureliaプロジェクトにエラーがあります。 in app.js

このコード行は、Visual StudioでExpected ';'

export class App { 
    configureRouter(config, router) { /// <== here is the error 
     this.router = router; 
     config.title = 'Aurelia'; 
     config.map([ 
      { route: ['', 'home'],  name: 'home',  moduleId: 'home/index' }, 
      { route: 'users',   name: 'users',  moduleId: 'users/index', nav: true }, 
      { route: 'users/:id/detail', name: 'userDetail', moduleId: 'users/detail' }, 
      { route: 'files/*path',  name: 'files',  moduleId: 'files/index', href:'#files', nav: true } 
     ]); 
    } 
} 

を示している私はすべてのデフォルトのオプションを使用してプロジェクトを作成し、それがbabel.Iを使用しているが、この構文はかなり一般的であると思いました。ここに私のconfig.jsがあります。

+1

あなたES6は、おそらく私はこのに遭遇してきた問題 – weagle08

+0

VS、エラーは通常、記載されている行の前にも発生する...正しいです。 50行前の文法が間違っていると、50行後に、特に中括弧やセミコロンの場合にのみ、それが上書きされる可能性があります。 –

答えて

0

ReSharperを使用している場合は、ReSharperのtypescriptオプションを変更してみてください。 ReSharper-> Options-> Code Editing-> TypeScript-> Inspectionsに進み、TypeScriptの目的のバージョンを設定します。

enter image description here

関連する問題