[Vuejs]-Going to a URL using VueJS

5👍

If you want to go to a URL which is not a Vue router URL, you can do it using standard javascript via:

window.location.href = '/file/' + file.path + '?token=' + localStorage.getItem('jwt-token');

See this answer.

👤jeerbl

1👍

This should work in vue router 2.0:

this.$router.push({path: '/file/' + file.path , query: {token: localStorage.getItem('jwt-token')} })

Leave a comment