我将一个名为 rowCollectionTest 的集合传递给车把模板,我认为存在语法问题。
我的车把模板上写着:
`<table id = "tableId" width= "600px" border + 1">
{{#each row}}
<tr>
<td> {{ this.car }} <td>
<td> {{ this.beans }} <td>
<td> {{ this.exercise }} <td>
<td> {{ this.iron }} <td>
</tr>`
我正在传递一个 rowCollectionTest,它是两行的集合(看看我是否可以完成这项工作)。
传递我所做的值
@$el.find("#searchContainerId").append(Handlebars.templates["resultsPage"](
row: rowCollectionTest
)}
我的模板文件中出现错误,因此我怀疑那里存在语法错误。这是怎么回事?