Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import { trigger, animate, transition, style, query } from '@angular/animations';
export const fadeAnimation =
trigger('fadeAnimation', [
transition( '* => *', [
query(':enter',
[
style({ opacity: 0 })
],
{ optional: true }
),
query(':leave',
[
style({ opacity: 1 }),
animate('0.5s', style({ opacity: 0 }))
],
{ optional: true }
)
])
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment