[Vuejs]-How to get router name of history router

0👍

Hi you could use beforeRouteEnter

beforeRouteEnter(to, from, next) {
  next(vm => {
    vm.prevRoute = from
  })
},

and in paramater from you will get previous route.

Leave a comment