angular router-outlet load before header component

2019-07-31 12:01发布

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>

0条回答
登录 后发表回答