Reputation: 33
If I have a vue-router 'router-view' element defined like this:
<router-view transition="slide">
Is there a way to change the transition to a 'fade' when a specific route is called?
Upvotes: 2
Views: 2065
Reputation: 153
Use a dynamic binding fopr transition:
<router-view :transition="$route.transition">
And set the data of transition from your route data
router.map({
'/specialroute': {
component: { ... },
transition: 'fade'
}
})
Upvotes: 3