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

时间:2019-03-19 15:09:39

标签: javascript html angular angular6 router-outlet

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 个答案:

没有答案