[Vuejs]-Vue.js <template> inside <tr> with IE 11

0👍

Jeff already explained the problem in his comment (IE’s lack of support for <template>).

A sort of hacky way to deal with this is to use a component and the is="" property:

<tr v-for="thing in things">
  <td v-for="subThing in thing" is="hackyComponent" :item="subThing">

and in hackyComponent:

<td>{{item.a}}</td>
<td>{{item.b}}</td>

export default {
 replace: true //replaces the original <td> with the template content
               // Vue might complain about creating a "Fragment Instance" in development, but that's not a real problem.

}

Leave a comment