Recently I began learning Angular and find myself in need of some assistance when it comes to managing a specific situation with Angular 16. In our project, we have two different versions of the site header represented by two components - one as the default and the other for certain pages. Currently, the header component is being called in app.component.html, but I am looking to implement a condition where the alternative header is displayed when viewing specific pages (each page corresponds to a component).
I thought that setting up a boolean variable to false by default would be a good approach, then changing it to true in the components requiring the alternative header. However, I am struggling to determine the best method to achieve this. While exploring various tutorials on passing data from child components to parent components, most seem to focus on user-generated values rather than those automatically generated by components or require importing the child component into the parent.
If anyone has insight on the optimal way to approach this or knows of a helpful tutorial that could guide me through this process, I would greatly appreciate it. Thank you!