Ship internal tools in hours, not weeks. Real auth, users, jobs, audit logs, and cohesive UI included. Early access $249 $499 → [Get it now]

How to emit events from child to parent in Angular

Emitting events from child to parent components is essential for building interactive Angular applications with proper component communication. As the creator of CoreUI, a widely used open-source UI library, I’ve implemented countless event-driven component interactions over 25 years of development. From my expertise, the most reliable approach is to use the @Output decorator with EventEmitter to create custom events that parent components can listen to. This pattern maintains loose coupling while enabling effective component communication.

Use @Output decorator with EventEmitter to emit events from child components.

// child.component.ts
@Output() buttonClick = new EventEmitter<string>()

onClick() {
  this.buttonClick.emit('Button was clicked!')
}

Here the @Output decorator creates a custom event called buttonClick using EventEmitter. When the onClick method is called, it emits the event with a string payload using emit(). The parent component can listen to this event in its template with (buttonClick)="handleEvent($event)" to receive the emitted data and respond accordingly.

Best Practice Note:

This is the same event communication pattern we use in CoreUI Angular components for reliable parent-child interaction. Always type your EventEmitter with the data type you’re emitting, and use descriptive event names that clearly indicate what action triggered the event.


Speed up your responsive apps and websites with fully-featured, ready-to-use open-source admin panel templates—free to use and built for efficiency.


About the Author

Subscribe to our newsletter
Get early information about new products, product updates and blog posts.
How to change opacity on hover in CSS
How to change opacity on hover in CSS

How to Open All Links in New Tab Using JavaScript
How to Open All Links in New Tab Using JavaScript

How to limit items in a .map loop in JavaScript
How to limit items in a .map loop in JavaScript

How to Clone an Object in JavaScript
How to Clone an Object in JavaScript

Answers by CoreUI Core Team