I have a very basic VueJS app which I'm building by following the website.
Here's the code, why is this component not rendering?
HTML:
<script src="https://unpkg.com/vue"></script>
<div id="app">
<p>{{ message }}</p>
</div>
<div>
<ol>
<todo-item></todo-item>
</ol>
</div>
JS:
new Vue({
el: '#app',
data: {
message: 'Hello Vue.js!'
}
})
Vue.component('todo-item', {
template: '<li>This is a list item</li>'
})
<todo-item>is outside of<div id="app">, which is the Vue mount point.<ol>insidediv#app.. link