Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(VueJS) vue-router match multiple paths

I am using vue-router, and am looking to match two very distinct paths. Is there some kind of array notation I can use?

like image 403
sir_thursday Avatar asked Jul 05 '17 03:07

sir_thursday


1 Answers

You can use an alias in the routes:

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

There are some nice examples here:

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

like image 148
Mark Avatar answered Oct 02 '22 23:10

Mark