Q. Which Angular decorator is used to listen to DOM events inside a component class?

  • (A) @HostListener
  • (B) @HostBinding
  • (C) @Output
  • (D) @Input
πŸ’¬ Discuss
βœ… Correct Answer: (A) @HostListener
Explanation: @HostListener listens to events on the host element.
Explanation by: Mr. Dubey
@HostListener listens to events on the host element.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
105
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
93%
Success Rate