リストテーブル テンプレートにコンボボックスを追加しました
<script type="text/x-handlebars-template" id="listItemTmpl">
<tr>
<td>{{partNo}}</td>
<td>
<select name="selectCombo" id="selectCombo">
{{#each chks}}
<option value='{{this.id}}' {{#if(this.id==status)}}selected{{/if}}>{{this.name}}</option>
{{/each}}
</select>
</td>
</tr>
</script>
だから私のchkモデルは;
chkModel = Backbone.Model.extend({
urlRoot:url,
defaults:{
name:""
}
});
しかし、今では次のようなエラーが発生します。
Uncaught Error: Parse error on line 13:
...ue='{{this.id}}' {{#if(this.id==status)}
-----------------------^
Expecting 'ID', got 'undefined'
それで、なにかお手伝いできますか?