import { Component, EventEmitter, Input, Output } from '@angular/core' @Component({ selector: 'ui-header-notification-item', template: `
{{ notification.from }} {{ notification.text }}
{{ notification.date | timeAgo }}
`, styles: [], }) export class HeaderNotificationItemComponent { @Input() public notification @Output() public action = new EventEmitter() public onClick(e) { e.preventDefault() this.action.emit({ type: 'NOTIFICATION_CLICK', payload: this.notification, }) } }