Bird
0
0

Consider this animation trigger:

medium📝 component behavior Q5 of 15
Angular - Animations
Consider this animation trigger:
trigger('slideToggle', [
  transition(':enter', [style({transform: 'translateX(-100%)'}), animate('400ms ease-in', style({transform: 'translateX(0)'}))]),
  transition(':leave', [animate('400ms ease-out', style({transform: 'translateX(-100%)'}))])
])

What visual effect occurs when the element enters the view?
ASlides in from the left over 400ms
BSlides out to the right over 400ms
CFades in with no movement
DInstantly appears without animation
Step-by-Step Solution
Solution:
  1. Step 1: Examine :enter transition styles

    The element starts translated -100% on X axis (off screen left) and animates to 0 (original position).
  2. Step 2: Understand animation timing

    The animation lasts 400ms easing in, producing a slide-in from left effect.
  3. Final Answer:

    Slides in from the left over 400ms -> Option A
  4. Quick Check:

    :enter with translateX(-100%) slides in left [OK]
Quick Trick: TranslateX(-100%) to 0 slides in from left [OK]
Common Mistakes:
  • Confusing enter with leave animation
  • Thinking it slides out right
  • Ignoring transform property

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes