パパエンジニアのアウトプット帳

30歳に突入した1児のパパエンジニアのブログ

vue.jsでtable内でtemplateを使うとIEで効かない問題

原因は下記のissueで書かれている通りなんだけど

https://github.com/vuejs/vue/issues/3028

The browser removes those elements before Vue can get access to them, 
because following the HTML spec, only thead, tbody and <tr> are allowed as direct children of a <table> element.


つまりtableの子要素はthead/tbody/trしか仕様としては許可してないからIEだとブラウザがtemplateを削除してしまうと。。。


vue.js v2なら大丈夫らしい。

Vue 2.0 will use a virtual DOM for templates, which does free us of such limitations.

v1なのは察してください。