(VueJS) vue-router match multiple paths

Viewed 20542

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

2 Answers

Best way to achive this is :

{
    path: '/internalplatforms',
    alias: ['/a_internalplatforms', '/b_internalplatforms'],
    name: 'ImportantPlatform',
    component: ImportantPlatform
}

By aliasing, you can call internalplatforms or a_internalplatforms or b_internalplatforms and it will show that same component.

Related