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
Source:stackexchange.com