Complete the code to import the animation functions from Angular.
import { trigger, [1] } from '@angular/animations';
The animate function is used to define the timing and styles of the animation steps.
Complete the code to define a keyframe animation inside the animate function.
animate('1s ease-in', [1]([style({ opacity: 0 }), style({ opacity: 1 })]))
The keyframes function allows defining multiple style steps in an animation.
Fix the error in the animation trigger by completing the missing transition function.
trigger('fadeIn', [transition('[1]', [animate('500ms ease-in')])])
The transition 'void => *' means the animation runs when the element enters the view.
Fill both blanks to create a keyframe animation that moves an element from left to right and fades in.
animate('2s ease-out', keyframes([style({ transform: 'translateX([1])', opacity: 0 }), style({ transform: 'translateX([2])', opacity: 1 })]))
The element starts 100px left ('-100px') and moves to 100px right ('100px') while fading in.
Fill all three blanks to create a trigger with two states and a transition that animates between them.
trigger('openClose', [state('open', style({ height: [1], opacity: [2] })), state('closed', style({ height: [3], opacity: 0 })), transition('open <=> closed', animate('300ms ease-in-out'))])
The 'open' state has height '200px' and full opacity '1'. The 'closed' state has height '0px' and opacity 0.