Skip to content

Instantly share code, notes, and snippets.

@billrobbins
Created November 19, 2018 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billrobbins/56c29d1830d6c29eb2241cf9d9be5d7d to your computer and use it in GitHub Desktop.
Save billrobbins/56c29d1830d6c29eb2241cf9d9be5d7d to your computer and use it in GitHub Desktop.
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