How to use Captured phase of @HostListener
Asked Answered
A

0

7

I want to use captured phase of @HostListener.

@HostListener('document:keydown.escape', ['$event']) onKeydownHandler(event: KeyboardEvent) {
    console.log("key pressed");
  }

Above code use default(bubble phase). One of the case I want to use captured phase, please help me, how to use captured phase of @HostListener.

Assessment answered 14/12, 2018 at 9:13 Comment(1)
#43253599Frumenty

© 2022 - 2024 — McMap. All rights reserved.