simple loading animation and fade in and out animations

This commit is contained in:
William Welling
2017-10-04 15:39:08 -05:00
parent 7937a47aa5
commit 45ca74410c
27 changed files with 222 additions and 58 deletions

View File

@@ -0,0 +1,24 @@
import { animate, state, transition, trigger, style, keyframes } from '@angular/animations';
const fadeEnter = transition(':enter', [
style({ opacity: 0 }),
animate(300, style({ opacity: 1 }))
]);
const fadeLeave = transition(':leave', [
style({ opacity: 1 }),
animate(400, style({ opacity: 0 }))
]);
export const fadeIn = trigger('fadeIn', [
fadeEnter
]);
export const fadeOut = trigger('fadeOut', [
fadeLeave
]);
export const fadeInOut = trigger('fadeInOut', [
fadeEnter,
fadeLeave
]);