Add $nuxt.on('routeChanged', to, from)

This commit is contained in:
Sébastien Chopin 2016-12-07 23:43:57 +01:00
parent be5e8c118d
commit 83cd431c52

View File

@ -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)