mardi 4 décembre 2018

How can I push a html page from vue router rather than route to another vue component in multi-page-mode Vue app?

i am new in Vue framework and trying to build a multi-page app in Vue.

i want to route to another html page (from index.html to dashboard.html) on an action.

In my Vue routes.js

path : '/dashboard',
        name:'dashboard',
        component : Dashboard  //here Dashboard means I want to go to dashboard.html page not a vue like Dashboard.vue
    },

and in my template :

<router-link to="/dashboard">
   <a href="#" class="nav-link">Go to dashboard</a>
</router-link>

How can I achieve this, or is there other way to switch html page in Vue?

Thank you.




Aucun commentaire:

Enregistrer un commentaire