Bird
0
0

How can you create an animation that repeats a 300ms fade-in and fade-out cycle 3 times using animate timing?

hard📝 component behavior Q9 of 15
Angular - Animations
How can you create an animation that repeats a 300ms fade-in and fade-out cycle 3 times using animate timing?
AUse <code>animate('300ms ease-in-out', style({opacity: 1}))</code> inside <code>group</code> repeated 3 times
BUse <code>animate('300ms ease-in-out', style({opacity: 1}))</code> inside a <code>keyframes</code> with repeated steps
CUse <code>animate('300ms ease-in-out', style({opacity: 1}))</code> with <code>delay(3)</code>
DUse <code>animate('900ms ease-in-out', style({opacity: 1}))</code> with <code>repeat(3)</code>
Step-by-Step Solution
Solution:
  1. Step 1: Understand repeating animations

    Angular animations repeat cycles using keyframes with multiple steps.
  2. Step 2: Use keyframes with animate timing

    Define fade-in and fade-out steps inside keyframes repeated 3 times.
  3. Final Answer:

    Use animate('300ms ease-in-out', style({opacity: 1})) inside a keyframes with repeated steps -> Option B
  4. Quick Check:

    Repeat cycles via keyframes, not repeat() or delay() [OK]
Quick Trick: Use keyframes with animate for repeated cycles [OK]
Common Mistakes:
  • Using repeat() which Angular does not support
  • Using delay() to repeat animations
  • Using group() for repetition

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes