10

vuejs newbie got a question, I created two components, 'hello' and 'world', when display then two in the html, only one got displayed, why? Thanks,

https://jsfiddle.net/aaoehLqe/3/

<div id="app">
    <hello :msg="'test1'" /> 
    <world :msg="'test2'" />     
</div>

1 Answer 1

13

Self closing tags are not a valid syntax. Try

<hello :msg="'test1'></hello>
<world :msg="'test2'></world>
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.