Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Component({
- selector: 'another-component',
- templateUrl: 'another.template.html',
- })
- export class AnotherComponent implements OnInit {
- constructor(private eventQueue: EventQueueService) {}
- ngOnInit() {
- this.eventQueue.on(AppEventType.ClickedOnNotification).subscribe(event => this.handleEvent(event.payload));
- }
- handleEvent(event: MouseEvent) {
- // Do something with the click event
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement