styleUrls: [ './my-account-notifications.component.scss' ]
})
export class MyAccountNotificationsComponent {
- @ViewChild('userNotification') userNotification: UserNotificationsComponent
+ @ViewChild('userNotification', { static: true }) userNotification: UserNotificationsComponent
markAllAsRead () {
this.userNotification.markAllAsRead()
}
+
+ hasUnreadNotifications () {
+ return this.userNotification.notifications.filter(n => n.read === false).length !== 0
+ }
}