Every component must have a single root element when template has more than one element. In this case, you need to wrap the elements with a parent element.
1 2 3 4 | <div class="todo-item"> <h2>{{ title }}</h2> <div v-html="content"></div> </div> |
Otherwise there will an error throwing, saying that “Component template should contain exactly one root element…”.
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.