Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk3 min

Angular Component Output Properties: Send Events and Data to a Parent

Use Angular outputs to notify a parent component and pass event data. See the recommended output() API, template bindings, aliases, dynamic subscriptions, and migration guidance.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Angular component outputs let a child component notify its parent that something happened and optionally pass data with the event. For new code, declare an output with output(), call its emit() method, and handle it in the parent template with (eventName)="handler($event)". The older @Output() and EventEmitter API remains supported.

Declare an output and emit a value

An output is a component or directive property that exposes a custom event to its consumers. The output() function returns an OutputEmitterRef<T>; the optional type describes the event payload.

As an Amazon Associate I earn from qualifying purchases.

import { output } from '@angular/core';

export class ChildComponent {
  itemAdded = output<string>();

  addItem() {
    this.itemAdded.emit('book');
  }
}

Declare the output in a component or directive property initializer. Angular recognizes this initializer as output metadata; it is not a general-purpose function to call later in a method. See Angular’s output API reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Listen in the parent and read the payload

Bind to the output in the parent template using its event name in parentheses. Angular passes the emitted value to the handler as $event.

<app-child (itemAdded)="addItem($event)" />

For example, if the parent’s handler accepts a string, it can use the value emitted by this.itemAdded.emit('book'). This child-to-parent pattern is also shown in Angular’s component output properties tutorial.

Choose the API for your code

Situation Use
Declaring an output in new code output<T>(), Angular’s recommended API for new projects. It is stable since Angular v19.0.
Maintaining an existing output @Output() valueChanged = new EventEmitter<number>() remains supported.
Listening in a component template (valueChanged)="handle($event)".
Listening to a dynamically created component Subscribe to the output property on the component instance.

The output() API was introduced in Angular v17.3 and is considered production-ready as of v19, according to the output migration guide. Check your project’s Angular version before adopting version-sensitive code. EventEmitter extends RxJS Subject and exposes additional Subject APIs, while OutputEmitterRef has a narrower, output-focused interface; the APIs are not interchangeable in every legacy use. See the EventEmitter API reference.

Name outputs for the event they represent

Use clear camelCase names such as valueChanged or panelClosed. Output names are case-sensitive. Avoid names that collide with native DOM events, such as click, and avoid an on prefix.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

An alias changes the public template event name without changing the TypeScript property name:

changed = output({ alias: 'valueChanged' });

Consumers bind to (valueChanged), while code in the class refers to changed. The decorator API also accepts an alias. Angular’s Component API reference documents the component metadata outputs option, which can expose inherited properties and specify aliases. Prefer the property’s natural name unless compatibility or a genuine naming conflict warrants an alias.

Subscribe to outputs on a dynamic component

When a component is created dynamically, subscribe through its instance rather than using a template binding:

componentRef.instance.someEventProperty.subscribe(value => {
  // Handle the emitted value.
});

Angular cleans up the subscription when the component is destroyed. You can explicitly unsubscribe earlier if the subscription should end before then. The outputs guide covers template and programmatic listeners.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Angular outputs are not bubbling DOM events

An Angular component output is handled through Angular’s event binding; it does not bubble through the DOM. A listener on an ancestor element will not receive a child’s Angular output through ordinary DOM bubbling.

Angular Elements is a separate integration. When a component is converted into a custom element, its outputs are dispatched as HTML Custom Events, and the emitted value is available on the event’s detail property. See Angular’s Custom Elements guide.

Migrate legacy outputs selectively

Angular provides a schematic that converts many decorator-based outputs to the function API. Run it from the project root:

ng generate @angular/core:output-migration

The schematic does not mean every legacy use should be changed blindly: review its changes and handle cases that need manual attention. The migration guide describes the migration and its limitations.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.