mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
Add $nuxt.on('routeChanged', to, from)
This commit is contained in:
parent
be5e8c118d
commit
83cd431c52
@ -234,6 +234,10 @@ function nuxtReady (app) {
|
||||
cb(app)
|
||||
}
|
||||
})
|
||||
// Add router hooks
|
||||
router.afterEach(function (to) {
|
||||
app.$nuxt.$emit('routeChanged', to, from)
|
||||
})
|
||||
}
|
||||
|
||||
Promise.all(resolveComponents)
|
||||
|
Loading…
Reference in New Issue
Block a user