ocket8888 commented on code in PR #6753:
URL: https://github.com/apache/trafficcontrol/pull/6753#discussion_r864211210
##########
experimental/traffic-portal/src/app/app.component.ts:
##########
@@ -26,14 +28,15 @@ import { CurrentUserService } from
"src/app/shared/currentUser/current-user.serv
styleUrls: ["./app.component.scss"],
templateUrl: "./app.component.html",
})
-export class AppComponent implements OnInit {
+export class AppComponent implements OnInit, AfterViewInit {
+ @ViewChild("header") private readonly headerRef!: TpHeaderComponent;
Review Comment:
I kinda hate `ViewChild` because it'll compile fine if the child doesn't
actually exist.
I know this is a major change to the PR, but what if instead we had a
`ThemeService` or something that exposes a `BehaviorSubject` and the header
just subscribes to it. Then you wouldn't need to register it either.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]