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