2

I am using vue.js and webpack to develop the homepage for my friend. however he want to keep some old pages which using javascript and jquery(cdn). Can I do some config in vue-router to do something like this.

/home --> Vue Project Homepage
/photo ---> Vue router change the router-view to photo.vue
/download ---> Go to the directory "/download" in project and load the index.html in "/download" directory
0

1 Answer 1

4

You can simply use Redirect and Alias of Vue router:

"Redirecting is also done in the routes configuration. To redirect from /a to /b:"

const router = new VueRouter({
  routes: [
    { path: '/a', redirect: '/b' }
  ]
})
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.