I have 5 components in my main.ts file. I have a header component which I am using for updating according to the component I click to.I have put this component in my app.component.html file. I want to show the back button in my header/navigation bar whenever I click on any of the 5 components.
I also have a bottom navigation bar, where I click to route to three different views, the first one being the home view and two others.
Following is the mockup for my app.
I want to update the navigation heading whenever I click on any component and also show or hide the back arrow button. And when I click the view buttons on the bottom of the screen, I want to update the heading accordingly. Should I create a service and inject it in every component? Kindly help in this regard.