Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. @Component({
  2. selector: 'another-component',
  3. templateUrl: 'another.template.html',
  4. })
  5. export class AnotherComponent implements OnInit {
  6. constructor(private eventQueue: EventQueueService) {}
  7.  
  8. ngOnInit() {
  9. this.eventQueue.on(AppEventType.ClickedOnNotification).subscribe(event => this.handleEvent(event.payload));
  10. }
  11.  
  12. handleEvent(event: MouseEvent) {
  13. // Do something with the click event
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement