[Vuejs]-V-for Property or method is not defined on the instance

2👍

In the code:

<td v-for="h in hs"/>{{h}}</td>

You are closing your td in />.

So the code above is actually:

<td v-for="h in hs"></td>{{h}}</td>

Which is why you get h as undefined.

Fix: Don’t close the td:

<td v-for="h in hs">{{h}}</td>

Updated JSFiddle here.

Leave a comment