我正在尝试创建一个剔除模板,该模板应该为剔除数组中的每一行生成一个表格行。当我添加下面的代码时,它告诉我“元素脚本不能嵌套在元素表中”
<table>
<tr>
<th>ID#</th>
<th>Name</th>
</tr>
<tr data-bind="template: { name: 'EmployeeTemplate', foreach: EmployeesArray }"></tr>
<script type="text/html" id="EmployeeTemplate">
<td>234567899874</td>
<td>Mr. Test </td>
</script>
如何使用淘汰模板解决此问题?我基于此链接。