vue-resource icon indicating copy to clipboard operation
vue-resource copied to clipboard

how to use vue-router in vue-resource?

Open VinceXie opened this issue 8 years ago • 0 comments

example:

import Vue from 'vue'
let loginMiddleware = function (request,next) {
  next(function (response) {
    if(response.status == 403){
      Vue.router.push('/home')
    }
  })
}

I got - TypeError: Cannot read property 'push' of undefined.

How can this work? No matter $router or router just not work.

VinceXie avatar Sep 15 '17 09:09 VinceXie