Q. How do you emit an event from a child component to a parent component?

  • (A) Using @Input() decorator
  • (B) Using @Output() and EventEmitter
  • (C) Using services
  • (D) Using ngOnInit lifecycle hook
πŸ’¬ Discuss
βœ… Correct Answer: (B) Using @Output() and EventEmitter
Explanation: Child components use @Output and EventEmitter to send data/events to parents.
Explanation by: Mr. Dubey
Child components use @Output and EventEmitter to send data/events to parents.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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