Hi all –
I have generated a blank starter template, and added a component/Page called TopNav, in which I have buttons that navigate through the app. So far so good and it works really well.
Now, I want to change the active state of the buttons contained in my TopNav, depending on what page I am on. I thought using a provider/service to communicate the state (which page I am on) to TopNav would be a straightforward thing to do, but my problem is that I have not found any way that works to get the current page from within my provider/service.
Am I doing things right?
In short: What’s the best way to communicate which page I am on, so that I can set the correct active button state in TopNav?