+ 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

9th Apr 2019, 5:55 AM
Arushi Singhania
Arushi Singhania - avatar
3 Antworten
+ 4
Split the script into head and body Component definition needs to be in head https://code.sololearn.com/WE70CNISTjJE/?ref=app
9th Apr 2019, 8:01 AM
Gordon
Gordon - avatar
+ 7
Thx a lot Gordon !!!
9th Apr 2019, 8:41 AM
Arushi Singhania
Arushi Singhania - avatar
+ 1
First of all, your custom component has to be defined before the Vue instance. That's your only trouble 😅
9th Apr 2019, 11:41 AM
Timur Myngbay
Timur Myngbay - avatar