Angular · Junior · Question 36 of 75
When does ngOnChanges run?
- ✓Correct answer: When a component input changes - first before
ngOnInit, then on every later change - 2On every keystroke anywhere in the app
- 3Only once when the component is destroyed
Explanation
It receives a SimpleChanges object with the previous and current values. With signal inputs you usually don't need it: computed() or effect() react to input changes directly.