Complete the code to import the animation trigger function.
import { [1] } from '@angular/animations';
The trigger function defines an animation trigger in Angular.
Complete the code to define an enter animation using opacity.
transition(':enter', [style({ opacity: 0 }), [1]('500ms ease-in', style({ opacity: 1 }))])
The animate function defines the timing and style changes for the animation.
Fix the error in the leave animation transition.
transition(':leave', [[1]('300ms ease-out', style({ opacity: 0 }))])
The animate function is required to specify the animation timing and style changes.
Fill both blanks to create a fade in and fade out animation.
animations: [trigger('fade', [transition(':enter', [[1](0), [2]('400ms ease-in', style({ opacity: 1 }))]), transition(':leave', [[2]('400ms ease-out', style({ opacity: 0 }))])])]
style sets the initial or final styles, and animate defines the animation timing and transition.
Fill all three blanks to define a slide in and slide out animation.
animations: [trigger('slide', [transition(':enter', [[1]({ transform: 'translateX(-100%)' }), [2]('300ms ease-out', style({ transform: 'translateX(0)' }))]), transition(':leave', [[2]('300ms ease-in', style({ transform: 'translateX(-100%)' })), [3]('*')])])]
Use style to set start/end positions and animate to define timing. The last blank resets styles instantly.
