次のスクリプト テンプレートがあります。
<script id="template" type="text/x-jsrender">
<div>
<label>Name</label>
<input data-link="FirstName" type="text" />
</div>
<button>Search</button>
</script>
次のコマンドで jsView を起動します。
$.templates("#template").link("#result", model);
モデルはjsオブジェクトです
function myModel() {
this.FirstName = "";
}
残念ながら、link
コマンドはエラーを引き起こします:
TypeError: elem.dispatchEvent is not a function
何が間違っている可能性がありますか?