-
Hi, got a code like this:
it works if there is only one span, but failed with following error if two spans:
how to fix this? thanks |
Beta Was this translation helpful? Give feedback.
Answered by
SimoTod
Feb 24, 2021
Replies: 1 comment
-
You can only have one root element inside your x-for template. I think the readme mentions it. <div x-data>
<template x-for="i in 10">
<div>
<span x-text="i" ></span>
<span x-text="i" ></span>
</div>
</template>
</div> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
sqllyw
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can only have one root element inside your x-for template. I think the readme mentions it.