Bird
0
0

In Angular, what capability does the @Input decorator provide to a child component?

easy📝 Conceptual Q1 of 15
Angular - Component Interaction
In Angular, what capability does the @Input decorator provide to a child component?
AIt defines a service to be injected into the component.
BIt enables the child component to emit events to the parent component.
CIt marks a method to be called when the component initializes.
DIt allows the child component to receive data from its parent component.
Step-by-Step Solution
Solution:
  1. Step 1: Understand @Input

    The @Input decorator is used to define input properties in a child component.
  2. Step 2: Data flow direction

    It allows data to flow from the parent component to the child component.
  3. Final Answer:

    It allows the child component to receive data from its parent component. -> Option D
  4. Quick Check:

    Data binding from parent to child uses @Input [OK]
Quick Trick: Parent to child data uses @Input decorator [OK]
Common Mistakes:
  • Confusing @Input with @Output
  • Thinking @Input is for event emission
  • Assuming @Input injects services

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes