javascript - Going to a URL using VueJS -
i'm trying go url this:
methods: { show (file) { this.$router.go('/file/' + file.path + '?token=' + localstorage.getitem('jwt-token')); } }
i'm not trying go component. want go following url:
'/file/' + file.path + '?token=' + localstorage.getitem('jwt-token')
but not work. it's redirecting me home page.
how can done?
if want go url not vue router url, can using standard javascript via:
window.location.href = '/file/' + file.path + '?token=' + localstorage.getitem('jwt-token');
see this answer.
Comments
Post a Comment