3
I’m making a simple transition in a webapp (using Animate.css), where the user clicks on a button and the current component leaves the screen on the left and the other component comes from right to left. But when I return to my initial component, the transition does not go the other way.
How can I accomplish this? Is there any property in Vue’s Transition for it to accomplish the opposite path?
Example of the properties below:
<transition name="router-anim" leave-active-class="animated slideOutLeft faster" enter-active-class="animated slideInRight faster" mode="out-in">
<router-view></router-view>
</transition>
Are you using a transition library or have you made your transitions yourself? If you did it yourself, you could post CSS as well.
– fernandosavio
I’m using Animate.css but regardless of the animation I can’t get the order "going" and "back" from it
– haykou
I understand, it is to facilitate our understanding of your problem... There could be something wrong with your CSS, but you can see that this is not the case. If you can, add in the question that you are using Animate.css
– fernandosavio
Dude, I made this Jsfiddle and in it is working the animation, both by clicking on the routes and using
history.back()
– fernandosavio
my problem is that if you repair the animation always comes from right to left, when I clicked on the "back" it was to go in the opposite direction
– haykou
I understood, but then I would have to have a structure to know when a route would be coming back, to then reverse the classes of Transition... the hole is further down anyway
– fernandosavio