Put in order · Angular course · Module 2: Components

@Input and @Output Data Flow

Arrange the steps of the data flow in parent-child communication via @Output (top to bottom):

Items to put in order

  • The child declares @Output() with an EventEmitter
  • An event occurs in the child (e.g. a click)
  • The parent receives the event via (event)="handler($event)"
  • The child calls .emit(data)
Show the answer

Correct order:

  1. The child declares @Output() with an EventEmitter
  2. An event occurs in the child (e.g. a click)
  3. The child calls .emit(data)
  4. The parent receives the event via (event)="handler($event)"