Ionic2 - How to get current active page?

Hello,

Is it possible in ionic 2 to detect from a parent components such as @App, which child component / page is currently active?

Thanks.

One thing you might investigate is injecting Router in your app’s constructor and subscribing to it. It will call the subscriber with the current url as it navigates.

Thanks for the reply. I did some research on Router earlier but I thought the ionic team were trying to simplify navigation and eliminate the use of Router. They must have something where you can get the current active page in the stack… @mhartington Mike ? :slightly_smiling:

+1. There should be a simpler way, e.g nav.getCurrentPage()

2 Likes

+1. There should be a simpler way, e.g nav.getCurrentPage()