Skip to content

Instantly share code, notes, and snippets.

@elyosemite
Created June 5, 2018 23:56
Show Gist options
  • Select an option

  • Save elyosemite/ad6fa083de05ad2a2faeb33de838450f to your computer and use it in GitHub Desktop.

Select an option

Save elyosemite/ad6fa083de05ad2a2faeb33de838450f to your computer and use it in GitHub Desktop.
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss'],
animations: [
trigger('goals', [
transition('* => *', [
query(':enter', style({ opacity: 0 }), {optional: true}),
query(':enter', stagger('300ms', [
animate('.6s ease-in', keyframes([
style({opacity: 0, transform: 'translateY(-75%)', offset: 0}),
style({opacity: .5, transform: 'translateY(35px)', offset: .3}),
style({opacity: 1, transform: 'translateY(0)', offset: 1})
]))]), {optional: true}),
query(':leave', stagger('300ms', [
animate('.6s ease-in', keyframes([
style({opacity: 1, transform: 'translateY(0)', offset: 0}),
style({opacity: .5, transform: 'translateY(35px)', offset: .3}),
style({opacity: 0, transform: 'translateY(-75%)', offset: 1})
]))]), {optional: true})
])
])
]
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment