1. I created a new folder pages in the src directory to store the components, and created two files in the pages folder: index.vue and content.vue
the code for configuring routing in 2.routes.js is as follows
{path:"/pages/index",name:"index",component:index},
{path:"/pages/content",name:"content",component:content}
part of the rendering code in 3.app.vue is as follows
< template >
< div id= "app" >
<div>
<router-link to="/pages/index"></router-link>
<router-link to="/pages/content"></router-link>
</div>
<router-view></router-view>
< / div >
< / template >
according to the above configuration, the page is blank and there is no error. I don"t know where the road is mismatched.
I have tried to put the index.vue and content.vue files in the relationship with the app.vue level. Modify path:/index and path:/content, and change it to to= "/ index" in router-link.
so here I want to ask why the path you put in the pages folder doesn"t work?