Hi,
I'm using in components navigation guards with vue router to manage transitions between vues but can't get the onComplete firing the "next" argument:
beforeRouteLeave(to, from, next) {
const self = this
const { Im } = self.$refs
const tl = new self.TimelineLite
tl.to(Im, .4, {
y: -40,
opacity: 0,
onComplete: next
})
}
So I ended up with this kind of hacky solution:
beforeRouteLeave(to, from, next) {
const self = this
const { Im } = self.$refs
const tl = new self.TimelineLite
tl.to(Im, .4, {
y: -40,
opacity: 0,
// onComplete: next
})
setTimeout(function(){
next()
}, 400)
},
Any ideas about how I could actually trigger the "next()" argument with the onComplete callback?
Thks.