How to use a custom vue component ?? | Sololearn: Learn to code for FREE!

+14

How to use a custom vue component ??

I have created a vue component named task list. When I am using it in body, it is working. But when I am trying to use it inside a Vue instance, I am getting an error. How can I do it ?? https://code.sololearn.com/WNA6CYe2S5wZ/?ref=app

4/9/2019 5:55:28 AM

Arushi Singhania

3 Answers

New Answer

+4

Split the script into head and body Component definition needs to be in head https://code.sololearn.com/WE70CNISTjJE/?ref=app

+7

Thx a lot Gordon !!!

+1

First of all, your custom component has to be defined before the Vue instance. That's your only trouble 😅