root component
<div class="container">
<div class="row">
<ng-container *ngIf="router.url !== '/login'">
<app-navbar></app-navbar>
</ng-container>
</div>
<ng4-loading-spinner></ng4-loading-spinner>
<router-outlet></router-outlet>
<div class="col-xs-12 col-sm-12 col-md-12">
<ng-container *ngIf="router.url !== '/login'">
<app-footer></app-footer>
</ng-container>
</div>
</div>
When I check if router.url
(router injected on root component typescript on constructor) equals ./login
then remove from DOM. But angular shows this template on 1-2 ms after loading page and then removes from DOM. But I don't want to visible <app-navbar></app-navbar>
and <app-footer></app-footer>
..