hide header bar for login page

This commit is contained in:
Mario Romano 2016-11-02 00:56:19 +00:00
parent 1f6a14aba6
commit 665e5de7f7
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,6 @@
<!-- Always shows a header, even in smaller screens. --> <!-- Always shows a header, even in smaller screens. -->
<div mdl class="mdl-layout mdl-js-layout mdl-layout--fixed-header"> <div mdl class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
<div *ngIf="isLoggedIn()"> <div *ngIf="!isLoginPage()">
<header class="mdl-layout__header"> <header class="mdl-layout__header">
<div class="mdl-layout__header-row"> <div class="mdl-layout__header-row">
<!-- Title --> <!-- Title -->

View File

@ -54,6 +54,10 @@ export class AppComponent {
return this.auth.isLoggedIn(); return this.auth.isLoggedIn();
} }
isLoginPage(): boolean {
return location.pathname === '/login' || location.pathname === '/';
}
onLogout(event) { onLogout(event) {
event.preventDefault(); event.preventDefault();
this.auth.logout() this.auth.logout()