Bird
0
0

Which of the following correctly defines a transition from state 'inactive' to 'active' in Angular animations?

easy📝 Conceptual Q2 of 15
Angular - Animations
Which of the following correctly defines a transition from state 'inactive' to 'active' in Angular animations?
Atransition('active => active', animate('500ms ease-in'))
Btransition('active => inactive', animate('500ms ease-in'))
Ctransition('inactive <=> active', animate('500ms ease-in'))
Dtransition('inactive => active', animate('500ms ease-in'))
Step-by-Step Solution
Solution:
  1. Step 1: Identify direction of transition

    The question asks for transition from 'inactive' to 'active'.
  2. Step 2: Match syntax

    Correct syntax is transition('inactive => active', ...).
  3. Step 3: Verify options

    transition('inactive => active', animate('500ms ease-in')) matches the required direction and syntax.
  4. Final Answer:

    transition('inactive => active', animate('500ms ease-in')) -> Option D
  5. Quick Check:

    Arrow direction matches state change [OK]
Quick Trick: Use 'state1 => state2' for one-way transitions [OK]
Common Mistakes:
  • Reversing the arrow direction
  • Using bidirectional '<=>' when only one direction is needed
  • Using same state transition

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes