Angular · Junior · Question 27 of 75
Why can't a child change the value of a signal created by input()?
- ✓Correct answer: Inputs are read-only: data flows down from the parent, which owns the value
- 2Signals can never be changed
- 3It is allowed and immediately updates the parent
Explanation
One-way data flow keeps the ownership clear. If the child needs to change it, emit an output, or use model(), which creates a two-way bindable signal: <app-rating [(value)]="rating" />.