Angular 22 · Components and templates

Pass data in and out

Receive a value with input() and notify the parent with output().

name = input.required<string>();
selected = output<string>();

select() {
  this.selected.emit(this.name());
}

Official Angular 22 documentation

More components and templates commands

All components and templates commands · Angular 22 cheatsheet

Was this page helpful?