C# 如何删除一个值

C# 如何删除一个值,c#,angular,asp.net-web-api,C#,Angular,Asp.net Web Api,我想在删除之前显示值的名称 不知道如何以角度绑定数据 1.有角度的html <div *ngIf="pnlItemType" class="col-12"> <table class="table table-bordered table-hover"> <thead class="thead-dark"> <th scope="col">Item Type Name</th>

我想在删除之前显示值的名称

不知道如何以角度绑定数据

1.有角度的html

    <div *ngIf="pnlItemType" class="col-12">
    <table class="table table-bordered table-hover">
        <thead class="thead-dark">
            <th scope="col">Item Type Name</th>
            <th scope="col" colspan="2"></th>
        </thead>
        <tbody class="bg-white">
            <tr *ngFor="let itemType of itemTypes">
                <td class="valign-middle">{{itemType.ItemTypeName}}</td>
                <td class="w-80 text-center">
                    <button type="button" class="btn btn-outline-primary" 
        title="Edit" (click)="editItemType(itemType)"><i class="fas fa- 
          pen"></i></button>
                </td>
                <td class="w-80 text-center">
                    <button type="button" class="btn btn-outline- 
           secondary" title="Delete" (click)="deleteItemType()"> <i 
          class="far fa-trash-alt"></i></button>
                </td>
            </tr>
               </tbody>
                 </table>
                    /div>
我想用粗体显示要删除的项目的名称。 还有你的HTML

(click)="deleteItemType(itemType)"
 deleteItemType(){

  this.hideModal();
  this.openLargeModal(this.mdlDeleteItemType);
}
deleteItemType(itemType){
  this.mdlDeleteItemType = itemType;
  this.hideModal();
 //Just Open Modal after it
}
(click)="deleteItemType(itemType)"