2016-07-11 8 views
2

コンソールにこの警告メッセージが表示されます。私は新しい角度2のルータを使用しています。この警告を修正するには何が欠けているのですか?ルータ3ベータ2に角2 RC4新しいルータ警告メッセージ

'DashboardComponent' not found in precompile array. 
To ensure all components referred to by the RouterConfig are compiled, you must add 'DashboardComponent' to the 'precompile' array of your application component. 
This will be required in a future release of the router. 
+0

は、このリンクを参照してください私のための警告を削除http://stackoverflow.com/questions/38144547/in-angular2-rc4-how-do-i-add- components-to-the-precompile-array – yurzui

答えて

10

アップグレードが

+2

ルータを3.0.0-beta.2にアップグレードするには、package.jsonで「@ angular/router」:「3.0.0-beta.1」を探し、 @ angle/router ":" 3.0.0-beta.2 "。次に、npm installとnpm startを実行します。 – Webucator

+2

これは私のためにそれを修正しなかった...理由が分かりません。ベータ2へのアップデートも確実にしました。 – Michael

+0

私の魅力のように働いた。 – Niall