(VueJS) vue-router corresponds to several paths

I am using vue-router and I want to combine two very different paths. Is there some kind of array notation I can use?

+5
source share
1 answer

You can use an alias in routes:

routes: [ { path: '/foo', component: Foo, alias: '/bar'} ] 

There are some good examples here:

https://github.com/vuejs/vue-router/blob/dev/examples/route-alias/app.js

+7
source

Source: https://habr.com/ru/post/1269496/


All Articles