Я работаю над приложением ionic и хочу нажать на страницу, когда открылось push-уведомление, но приложение не переместилось для просмотра.
мой код:
app.component.ts
this.oneSignal.handleNotificationOpened().subscribe((payload) => {
this.categoryService.goToView.next(post_id)
});
home.ts
this.categoryService.goToView.subscribe(id=>{
this.categoryService.getPostsFromServer({include:id}).subscribe(item=>{
this.itemTapped(item);
})
})
itemTapped
itemTapped(item) {
this.navCtrl.push(ViewPage, {
item: item
});
}
любые предложения.