[Vuejs]-When using vue router getting error

0👍

Usually Vue.use is used in conjunction with import statements. Here’s an example.

import VueRouter from 'vue-router';

class nameOfClass{
   init(){
     Vue.use(VueRouter);
   }
}

Also, vue-router should be in the dependancies section of your package.json

Leave a comment