How to make Ionic firebase onNotificationOpen wait untill the app loads completely?

I am working on Ionic 3 firebase push notification on-click of notification I need to navigate to different page based on payload in the notification.

When ever I push a notification and if the app is Killed/Not yet launched(i.e not in background/foreground). On click of notification the app gets opened and onNotificationOpen events gets triggered before I set the root-page or app load is complete and later after few seconds root-page is set.

How do I solve this? So that on-click of notification I can take to the different page based on the notification after the root page is set?

The same works good when the app is in foreground/background scenario, Need solution if the app is killed/Not Yet Launched scenario.

Cordova-Plugin-Firebase

where are u call this.openPushedNtification() ; ?