P
P
Pavel Vinogradov2020-10-30 02:09:40
Vue.js
Pavel Vinogradov, 2020-10-30 02:09:40

VUE CLI component nesting not working?

Hello everyone. Guys really need help, dancing with tambourines is already tired
. Project structure

5f9b4897c0203233990714.png

I put one file {Header.VUE} into another {HelloWrld} and output one {HelloWrld} and connect it to APP.VUE
. When starting it does not see the contents of {Header. VUE}
writes Unknown html tag Header
name change can not, tell me how to arrange the assembly and output of files
in the document

<template>
  <header>
    <h1>
      Привет
    </h1>
  </header>
</template>

<script>
export default {
  name: "Header"
}
</script>

<style scoped>

</style>


<template>
  <div id="Quiz">
    <Header></Header>
  </div>

</template>

<script>
import Header from "@/components/item/Header";
export default {

 comments: {Header},
  name: "Quiz",


}
</script>

<style scoped>

</style>


<template>
  <div id="app">
 
  <Quiz></Quiz>
  </div>
</template>

<script>

import Quiz from "@/components/Quiz";

export default {

  name: 'App',
  components: {
  Quiz
  }
}
</script>

<style>
 
</style>


5f9bcc44e46bf569313305.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2020-10-30
@yarkov Vue.js

The file name is HelloWorld.vue, the name of the Quiz component.
How to import it?

comments: {Header},

This is epicfail))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question