//create route plugin export default ({ app }) => { // Every time the route changes (fired on initialization too) app.router.afterEach((to, from) => { //do something to validate }) } // add to nuxt.config.js file plugins: ['~/plugins/route']
//create route plugin export default ({ app }) => { // Every time the route changes (fired on initialization too) app.router.afterEach((to, from) => { //do something to validate }) } // add to nuxt.config.js file plugins: ['~/plugins/route']