Updated the navbar hiding logic to actually work
This commit is contained in:
1 parent
a8bd5e0060
commit
5fbb41c477
1 file changed
+16
-6
@@ -93,12 +93,22 @@ export class AppComponent implements OnInit {
|
||||
const currentRoute = this.activatedRoute.snapshot.firstChild?.routeConfig?.path;
|
||||
|
||||
// Hide navbar and footer on admin route
|
||||
if (currentRoute === 'admin'||'login') {
|
||||
this.showNavbar = false;
|
||||
this.showFooter = false;
|
||||
} else {
|
||||
this.showNavbar = true;
|
||||
this.showFooter = true;
|
||||
switch (currentRoute) {
|
||||
case 'admin': {
|
||||
this.showNavbar = false;
|
||||
this.showFooter = false;
|
||||
break;
|
||||
}
|
||||
case "login": {
|
||||
this.showNavbar = false;
|
||||
this.showFooter = false;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
this.showNavbar = true;
|
||||
this.showFooter = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user