I’m using OneSignal to receive push notification. But when i send this.nav.push(NotificationsPage, {data: data}); the page open but not showing Tabs from TabsPage. What can i do?
@Component({
templateUrl: 'app.html'
})
export class MyApp {
@ViewChild('myNav') nav
rootPage:any;
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, userStorage : UserStorageService, private oneSignal: OneSignal ) {
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
statusBar.styleBlackTranslucent();
splashScreen.hide();
userStorage.isAuthenticated().then(isAuth => {
if(isAuth) {
this.rootPage = TabsPage;
} else {
this.rootPage = ChooseCompanyPage;
}
})
this.oneSignal.startInit("XXXX", "XXXXX")
this.oneSignal.inFocusDisplaying(this.oneSignal.OSInFocusDisplayOption.Notification);
this.oneSignal.handleNotificationOpened().subscribe(data =>{
this.nav.push(NotificationsPage, {data: data});
})
this.oneSignal.endInit();
});
}