Error in v-on handler: TypeError: Cannot use in operator to search for in null
<div :v-for="option in this.options">
<div v-if="option" class="option mt-4">
{{ option }}
</div>
</div>
You have to fix the following:
1. Change :v-for to just v-for
2. Remove this. from this.options because you only should use this. in the
script area
3. Put this whole block inside another <div> because there should be only 1
element inside <template> tag. So since you're using a loop, multiple elements
will be rendered
Are there any code examples left?
New code examples in category Javascript