angular router-outlet load before header component, how to prevent?

隐身守侯 提交于 2019-12-24 06:13:27

问题


As in the app-component.html below. The router-outlet components load before app-header component. How to prevent router components to load before header and footer.

<!--The content below is only a placeholder and can be replaced.-->
<app-header *ngIf="router.url !== '/login' && router.url !== '/register-user'"> 
</app-header>

<div>
    <router-outlet></router-outlet>
</div>

<app-footer *ngIf="router.url !== '/login' && 
router.url !== '/register-user'"></app-footer>

来源:https://stackoverflow.com/questions/55244213/angular-router-outlet-load-before-header-component-how-to-prevent

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