0👍
If you define your component like this:
components: {
Header
},
call it inside your template like this: <Header />
with capitalize.
If you want to use kebab-case like: <header></header>
, define your component like this:
components: {
'header': Header
},
Edit
According to @MaxLyashuk comment, the naming convention for Vue component (source) is case-insensitive in that case.
The fact that <Header />
capitalized worked is because <header>
is a reserved word for html markup.
- [Vuejs]-VueJs-tinder swiper
- [Vuejs]-Input data got reset after checkbox is checked when using Vue js
Source:stackexchange.com