πŸ“Š Angular
Q. What does the Angular decorator @HostListener do?
  • (A) Binds a method to a DOM event of the host element
  • (B) Defines component inputs
  • (C) Creates a new Angular service
  • (D) Defines child components
πŸ’¬ Discuss
βœ… Correct Answer: (A) Binds a method to a DOM event of the host element

Explanation: @HostListener listens to events on the component's host element and triggers methods.

Explanation by: Mr. Dubey
@HostListener listens to events on the component's host element and triggers methods.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
55
Total Visits
πŸ“½οΈ
9 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
82%
Success Rate