This commit is contained in:
2020-03-07 23:00:11 +01:00
committed by smuddy
parent ccd91aa81c
commit d68cd590ad
57 changed files with 2012 additions and 3489 deletions

View File

@@ -1,4 +1,4 @@
import {animate, state, style, transition, trigger} from '@angular/animations';
import {animate, query, state, style, transition, trigger} from '@angular/animations';
export const fade = [
// the fade-in/fade-out animation.
@@ -18,3 +18,23 @@ export const fade = [
animate(300, style({opacity: 0, display: 'block', transform: 'translateY(-20px)'})))
])
];
export const fader =
trigger('fader', [
transition('* <=> *', [
// Set a default style for enter and leave
query(':enter, :leave', [
style({
position: 'absolute',
left: 0,
width: '100%',
opacity: 0,
transform: 'scale(0.96) translateY(-10px)',
}),
], {optional: true}),
// Animate the new page in
query(':enter', [
animate('200ms ease', style({opacity: 1, transform: 'scale(1) translateY(0)'})),
], {optional: true}),
]),
]);