Answer the question
In order to leave comments, you need to log in
Angular 2 route animation. How to reverse animation?
There is such an animation that works quite well:
trigger('routerTransition', [
state('void', style({position:'fixed', width:'100%'}) ),
state('*', style({ position:'fixed', width:'100%'}) ),
transition(':enter', [
style({transform: 'translateX(-100%)'}),
animate('0.5s ease-in-out ', style({transform: 'translateX(0%)'}))
]),
transition(':leave', [
style({transform: 'translateX(0%)'}),
animate('0.5s ease- in-out', style({transform: 'translateX(100%)'}))
])
]);
Pages roll from left to right and all is well. But there are cases when I need to run the animation in the opposite direction, for example, by clicking on the "back" button (as in native ios applications). Tell me how it can be implemented or where to peep. Thanks in advance
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question