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

  • (A) @HostListener
  • (B) @Output
  • (C) @Input
  • (D) @ViewChild
πŸ’¬ Discuss
βœ… Correct Answer: (A) @HostListener
Explanation: @HostListener binds event handlers to host element events.
Explanation by: Mr. Dubey
@HostListener binds event handlers to host element events.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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