Bird
0
0

What is the main purpose of the @Input decorator in Angular?

easy📝 Conceptual Q11 of 15
Angular - Component Interaction
What is the main purpose of the @Input decorator in Angular?
ATo define a route in Angular
BTo send data from a child component to its parent component
CTo create a new Angular service
DTo allow a child component to receive data from its parent component
Step-by-Step Solution
Solution:
  1. Step 1: Understand the role of @Input

    The @Input decorator is used to mark a property in a child component that can receive data from its parent.
  2. Step 2: Compare options with the concept

    Only To allow a child component to receive data from its parent component correctly describes this data flow from parent to child. Options B, C, and D describe other unrelated Angular features.
  3. Final Answer:

    To allow a child component to receive data from its parent component -> Option D
  4. Quick Check:

    @Input passes data parent to child [OK]
Quick Trick: Remember: @Input means data flows into child [OK]
Common Mistakes:
  • Confusing @Input with @Output
  • Thinking @Input sends data up to parent
  • Mixing @Input with services or routing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes