Bird
0
0

If a parent Angular component uses the default change detection strategy, what occurs when a child component's @Input property changes?

medium📝 component behavior Q5 of 15
Angular - Change Detection
If a parent Angular component uses the default change detection strategy, what occurs when a child component's @Input property changes?
AThe child component requires manual change detection to update its view.
BThe child component's view updates automatically during the next change detection cycle.
CThe parent component must emit an event to update the child view.
DThe child component's view will not update unless OnPush strategy is used.
Step-by-Step Solution
Solution:
  1. Step 1: Understand default strategy propagation

    Default strategy runs change detection for all components including children.
  2. Step 2: Effect on child @Input changes

    When a child's input changes, Angular detects and updates its view automatically.
  3. Final Answer:

    The child component's view updates automatically during the next change detection cycle. -> Option B
  4. Quick Check:

    Default strategy auto-updates child views on input change [OK]
Quick Trick: Child views auto-update with default strategy [OK]
Common Mistakes:
MISTAKES
  • Thinking manual detection is needed
  • Believing parent must emit events
  • Confusing with OnPush requirements

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes