[Vuejs]-How to handle v-if with the back button in Vue.js?

0👍

Try this:

<div id="app">
    {{ view }} //for debugging

    <router-view></router-view>
</div>

And then add two routes:

{
    path: '/',
    name: 'emails',
    component: Emails,
},
{
    path: '/login',
    name: 'email.show',
    component: EmailShow,
}

After that Emails component should handle logic of showing all emails and EmailShow should handle showing just one email

Leave a comment