Suggest an editImprove this articleRefine the answer for “How do you pass state between a parent and a child component?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)State between a parent and a child component is passed through **@Input** and **@Output** - the standard communication mechanism in Angular. **Key point:** @Input gives a value, @Output receives a reaction, and a shared service is used when state must be shared across multiple levels of the component tree.Shown above the full answer for quick recall.Answer (EN)ImageState between a parent and a child component is passed through **@Input** and **@Output** - the standard communication mechanism in Angular. --- ### 1. Passing *down* - through `@Input` The parent gives data to the child: ```ts // parent template <app-child [count]="parentCount"></app-child> ``` ```ts // in the child component @Input() count!: number; ``` --- ### 2. Passing *up* - through `@Output` and `EventEmitter` The child component notifies the parent about changes: ```ts // in the child component @Output() increment = new EventEmitter<void>(); someMethod() { this.increment.emit(); } ``` ```html <!-- parent subscribes to the event --> <app-child (increment)="handleIncrement()"></app-child> ``` --- ### 3. An alternative - a shared service If components are hard to connect directly (or sit deeper in the hierarchy), you can use a shared service with a `signal`, `BehaviorSubject`, or `store`. --- **Conclusion:** - *@Input* - to **give a value** - *@Output* - to **get a reaction** - a shared service - when you need to **share state across multiple levels or branches** of the component tree.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.