Bird
0
0

Why does this animation use default offset values?

medium📝 Debug Q7 of 15
Angular - Animations
Why does this animation use default offset values?
animate('1s', keyframes([
  style({opacity: 0}),
  style({opacity: 1})
]))

Assuming it is used inside a trigger.
AMissing offset values in keyframes
Banimate() duration is too short
Cstyle() cannot be used without state()
DKeyframes must have at least 3 steps
Step-by-Step Solution
Solution:
  1. Step 1: Check keyframe offset requirements

    When using keyframes, each style should have an offset between 0 and 1 to define timing.
  2. Step 2: Confirm other options are incorrect

    Duration length is valid, style() can be used without state(), and keyframes can have 2 steps.
  3. Final Answer:

    Missing offset values in keyframes -> Option A
  4. Quick Check:

    Keyframes need offset values [OK]
Quick Trick: Always include offset in keyframe styles [OK]
Common Mistakes:
  • Omitting offset values in keyframes
  • Thinking duration affects animation running
  • Confusing style() usage with state()

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes