A
A
Alexander Belkevich2017-06-24 21:30:45
Vue.js
Alexander Belkevich, 2017-06-24 21:30:45

Why is the vue component not working?

Hello. I'm starting to learn vue.js. I do not understand why the example from the documentation does not work.
I define a component

Vue.component('todo-item', {
  template: '<li>Это todo</li>'
})

I insert a component
<ul>
  <todo-item></todo-item>
</ul>

In theory, the template of the component should appear. But for some reason it doesn't work.. https://jsfiddle.net/50wL7mdz/42456/
What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Kulakov, 2017-06-24
@AlexBelkevich

You have created a component for vue but have not instantiated the vue itself: https://jsfiddle.net/nu41bvfq/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question