Input and Output Properties
Explain how @Input and @Output enable one-directional parent-child data flow and event communication.
@Input() and @Output() are the backbone of Angular's component communication model, and they exist to enforce a predictable, one-directional data flow: data flows down from parent to child via inputs, and events flow up from child to parent via outputs. Interviewers ask about this early because it's foundational, but they often push into edge cases — like whether mutating an object passed via @Input() from inside the child is a good idea (it isn't, generally, since it breaks the unidirectional mental model and can cause subtle bugs).
Think of a factory assembly line: raw materials (inputs) are handed down to a workstation, and finished parts or alerts (outputs) get sent back up the line — the workstation never reaches backward into the supply chain to change what's above it.