Angular 2 Duplicate Header

守給你的承諾、 提交于 2019-12-01 10:23:32

问题


Duplicate header issue occurs, while using the <router-outlet></router-outlet> in the AppComponent Template.

I'm using 'angular 2.0.0-rc.6' and 'router 3.0.0-rc.1'

Does anyone have any idea, why is this happening?


回答1:


The application is showing two headers on start because your default path is set to be your AppComponent, which has the header included. That path is shown inside of another AppComponent, which you started in your app.module.ts in the bootstrap field. You can resolve this by replacing your default path with another component.

Please also make sure to upgrade your package.json according to the latest package list at https://angular.io/guide/quickstart.



来源:https://stackoverflow.com/questions/39277700/angular-2-duplicate-header

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!