Рабочие анимации. У нас не было времени провести параллельное сравнение, чтобы понять, почему это работает, а у другого нет, но вот код:
import {sequence, trigger, stagger, animate, style, group, query, transition, animateChild} from '@angular/animations';
export const RouterAnimation = trigger('routerAnimation', [
transition('* => *', [
query(':enter, :leave', style({ position: 'fixed', width: '100%' }), {optional: true}),
query(':enter', style({ transform: 'translateX(100%)' }), {optional: true}),
sequence([
query(':leave', animateChild(), {optional: true}),
group([
query(':leave', [
style({ transform: 'translateX(0%)' }),
animate('500ms ease', style({ transform: 'translateX(-100%)' }))
], {optional: true}),
query(':enter', [
style({ transform: 'translateX(100%)' }),
animate('500ms ease',
style({ transform: 'translateX(0%)' })),
], {optional: true}),
]),
query(':enter', animateChild(), {optional: true}),
])
])
]);
Еще одна вещь, на которую следует обратить внимание, - я обновился до версии 6.0.3 и включил все полифилы.