Problem Statement
How do you pass data between parent and child components?
Explanation
Use `@Input()` on the child to receive data from the parent: `<child [value]="parentValue">`. Use `@Output()` with `EventEmitter` on the child to send events up: `<child (saved)="onSaved($event)">`. For siblings or deep sharing, use a service.
Code Solution
SolutionRead Only
// child @Input() childData!: string; @Output() childEvent = new EventEmitter<string>(); // parent template <app-child [childData]="parentData" (childEvent)="handle($event)"></app-child>