Yes it is possible to navigate to the login page and have the navigation bar not showing in that login page.
One way to achieve this, is by removing the navigation bar from view when the current route is /login. Create a boolean property in app.component.ts that will represent if the route's current state is /login.
app.component.ts could look like this:
import { Component } from '@angular/core';
import { Router, NavigationEnd } from '@angular/router';
import { filter } from 'rxjs/operators';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
})
export class AppComponent {
isLoginPage: boolean;
constructor(private router: Router) {
this.router.events.pipe(
filter(event => event instanceof NavigationEnd)
).subscribe((event: NavigationEnd) => {
this.isLoginPage = this.router.url === '/login';
});
}
}
Then bind this boolean property to the navigation bar with *ngIf directive.
In app.component.html:
<div *ngIf="!isLoginPage" id="temporary-navigator style="text-align: center;">
...
</div>