2
<table class="border-grey ocj-admin-table">
<tr>
<th>Customer ID</th>
<th>Contract ID</th>
<th>Product Instance ID</th>
</tr>
<tr *ngFor="let journeyDetail of journeyDetails; let i = index">
<td ><input #custId type ="textField"/></td>
<td ><input #contractId_{{i}} type ="textField"/></td>
<td ><a href="?{{custId_{{i}}.value}}&{{contractId_{{i}}.value}}">launch</a></td>
</tr>
</table>
我想啓動到由輸入字段構成的url。但是我在href的兩個大括號中出現錯誤。角2從* ngFor循環中的輸入單元訪問數據
我做錯了什麼?
究竟是什麼,例如'custId_0.value'?你能展示一個[mcve]嗎?爲什麼把這些複雜的東西放在模板中而不是顯示的對象上? – jonrsharpe