0

Собственно вопрос в заголовке, пишу код как в руководстве. Вот ссылка на CodePen

Vue.component('todo-item', {
  template: '<li>Hello, World</li>'
});
<ul>
  <todo-item></todo-item>
</ul>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.3.4/vue.min.js"></script>

1 ответ 1

0

Нужно создавать экземпляр Vue:

https://ru.vuejs.org/v2/guide/components.html#Использование-компонентов

https://codepen.io/antonowano/pen/xLPZzp

   Vue.component('todoItem', {
     template: '<li>Hello, World</li>'
   });

   new Vue({
     el: 'ul'
  })

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.