Home

Issue: 94

Router Hooks define

[issue link]

Can i do something when router is instantiated;
I wanne define a hook then like ‘beforeEach’;

Now I can do it in my component only.

created () {
    this.$router.afterEach((r) => {
      console.log('after each', r);
    })
}

That’s not a good way. I wanne a hook or callback in framework options.
just like require('my-custom-router-define.js')(router) after router is instantiated.

I see the plugins options are require in index.js

Can you require some function we define after the app instantiated, and call the function use param app

This question is available on Nuxt.js community (#c75)