Angular 2 RC4新路由器警告消息

Rob*_*dia 2 router angular

我在控制台上看到此警告消息.我正在使用新的angular 2路由器.我错过了什么或者我必须做些什么来修复这个警告?

'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.
Run Code Online (Sandbox Code Playgroud)

Kei*_*ebe 10

升级到路由器3 beta 2删除了警告

  • 要将路由器升级到3.0.0-beta.2,请在package.json中查找"@ angular/router":"3.0.0-beta.1"并将其更改为"@ angular/router":"3.0.0 -beta.2" .然后运行npm install和npm start. (2认同)
  • 这对我来说并没有解决它......不知道为什么.我确保它也更新到beta 2. (2认同)