Answer the question
In order to leave comments, you need to log in
What is the best way to implement the page?
Hey Ya. Installed vue cli. In the src folder, I created the pages folder, inside I created Home.vue, in it, between the template tag, I opened a div and inside I put the entire header section code of the home page, etc. Due to the fact that without a div, vue swears. So then I connected this file to App.vue. so the output is a div with id app inside a div without a class, just so that vue doesn’t bug out because of the header and section, etc. and inside my header section code, etc. So that's something mench does not like that I use a meaningless div. So how do you do all this, can you tell me? Ps the site is multi-page.
Answer the question
In order to leave comments, you need to log in
Each component has only one root element because of this and swears, but for good, the header is a separate component, the section is separate, the page is also a separate component.
Get something like this
// App.vue
<div id="app">
<app-header/>
<router-view/>
<app-footer/>
</div>
<div id="page">
...page content
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question