So i have a side menu ionic 2 app.
I have a home page and the side menu pages.
And on receiving a push notification i want to land into one of the side menu page.
Scenario1: When the app is NOT running in background.
On clicking the notification, i first land into home page and then redirected to specific side menu page.
Scenario2: When the app is running in background.
On clicking the notification, i directly land into specific side menu page.
I want the scenario1 to also behave as scenario2. Any pointer on how this can be done.
I have tried using nav.SetRoot(desiresPage) for scenario1 but dint work.
push.on(ānotificationā, (data:NotificationEventResponse) => {
if(data.additionalData.additionalData.type == āsomeValueā){
this.nav.setRoot(SideMenuPage1);
} else {
this.nav.setRoot(SideMenuPage2);
}
});