Skip to content

Commit 62a752b

Browse files
JeanMechecrisbeto
authored andcommitted
docs(docs-infra): AppComponent cleanup (#60212)
PR Close #60212
1 parent 30ede6b commit 62a752b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

adev/src/app/app.component.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import {
1414
OnInit,
1515
PLATFORM_ID,
1616
input,
17-
linkedSignal,
17+
signal,
1818
} from '@angular/core';
1919
import {NavigationEnd, NavigationSkipped, Router, RouterOutlet} from '@angular/router';
20-
import {filter, map, skip} from 'rxjs/operators';
20+
import {filter, map} from 'rxjs/operators';
2121
import {
2222
CookiePopup,
2323
getActivatedRouteSnapshotFromRouter,
@@ -59,8 +59,7 @@ export class AppComponent implements OnInit {
5959
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
6060

6161
displaySecondaryNav = input(false);
62-
hideFooter = input(true);
63-
displayFooter = linkedSignal(() => !this.hideFooter());
62+
displayFooter = signal(false);
6463
displaySearchDialog = inject(IS_SEARCH_DIALOG_OPEN);
6564

6665
ngOnInit(): void {
@@ -71,6 +70,9 @@ export class AppComponent implements OnInit {
7170
map((event) => event.urlAfterRedirects),
7271
)
7372
.subscribe((url) => {
73+
// We can't use an input binded to the route here
74+
// because AppComponent itself is not a routed component
75+
// so we access it via the snapshot
7476
const activatedRoute = getActivatedRouteSnapshotFromRouter(this.router);
7577
this.displayFooter.set(!activatedRoute.data['hideFooter']);
7678

0 commit comments

Comments
 (0)