this.notificationOpenedListener = firebase.notifications().onNotificationOpened((notificationOpen) => {
if (notificationOpen) {
const notification: Notification = notificationOpen.notification;
if(notification.data.type){
firebase.notifications().removeAllDeliveredNotifications()
}
}
});
console.log('notificationOpenedListener', this.notificationOpenedListener());
this.notificationOpenedListener()->>这是未定义的
有人知道为什么它没有定义吗?