0
我正在使用Ionic和FCM(firebase)插件發送推送通知。我可以收到通知,當我點擊通知時,它會成功觸發警報,但不會導航到指定的選項卡。只是爲了確保這條線:點擊通知後,Ionic無法導航到特定選項卡?
this.tab.select(2);
作品我已經測試與一個按鈕,代碼導航和它的作品
FCMPlugin.onNotification(function(data){
if(data.wasTapped){
//Notification was received on device tray and tapped by the user.
alert('data was tapped');
this.tab.select(2);
//this.navCtrl.push(ViewurgentnewsPage); also tried this
}else{
//Notification was received in foreground. Maybe the user needs to be notified.
alert('this was received on foreground');
}
});
非常感謝!那工作:D – Mikethetechy