【KnockoutJS】Uncaught ReferenceError: Unable to process binding "template: function (){return {name:'hoge',foreach:hoge_list} }"
KnockoutJSでtemplate使ってたら、タイトル通り
Uncaught ReferenceError: Unable to process binding "template: function (){return {name:'hoge',foreach:hoge_list} }"
って出てなんぞ?( ´_ゝ`)
ってなった。
おまけに
Message: Unable to process binding "value: function (){return hoges }"
Message: Unable to process binding "checkedValue: function (){return hoges }"
Message: hoges is not defined
っていうメッセージも出てる。
で、小一時間調べたら
template内でhogesっていう存在しないプロパティ使ってると、template自体が失敗した感じでエラー出るよ( ´_ゝ`)的なやつだった。
つまり、template内部で
<div data-bind="text: hoges"></div>
でhogesなんていう知らない変数使うな(ノ*'ω'*)ノ彡┻━┻
templateごとエラーにしとくでwww∠( ゚∀゚)/
ということらしい。(ノ*'ω'*)ノ彡┻━┻(ノ*'ω'*)ノ彡┻━┻(ノ*'ω'*)ノ彡┻━┻
その辺jsは無視してくれる印象あるから、全然気にしてなかった( ´_ゝ`)