想要在单击编辑按钮时获取 productCode 的值
want to get value of productCode while clicking on edit button
我想在单击编辑按钮时获取 productCode 的值
<tr *ngFor=" let x of response">
<td ><img src = "{{x.productPrimaryImage}}"></td>
<td>{{x.productCode}}</td>
<td>{{x.productName}}</td>
<td>{{x.status}}</td>
<td>{{x.productCategories}}</td>
<td>{{x.productMRP}}</td>
<td>{{x.productSSP}}</td>
<td>{{x.productYMP}}</td>
<td><button class=" btn btn-info btn-sm" (click)"editProduct()">edit</button></td>
</tr>
</tbody>
</table>
假设editProduct
方法有一个productCode
参数,你可以这样传入:
<button class=" btn btn-info btn-sm" (click)"editProduct(x.productCode)">edit</button>
我想在单击编辑按钮时获取 productCode 的值
<tr *ngFor=" let x of response">
<td ><img src = "{{x.productPrimaryImage}}"></td>
<td>{{x.productCode}}</td>
<td>{{x.productName}}</td>
<td>{{x.status}}</td>
<td>{{x.productCategories}}</td>
<td>{{x.productMRP}}</td>
<td>{{x.productSSP}}</td>
<td>{{x.productYMP}}</td>
<td><button class=" btn btn-info btn-sm" (click)"editProduct()">edit</button></td>
</tr>
</tbody>
</table>
假设editProduct
方法有一个productCode
参数,你可以这样传入:
<button class=" btn btn-info btn-sm" (click)"editProduct(x.productCode)">edit</button>