Javascript 如何在<;td>;使用角度的表格字段,其中*ngFor是循环?

Javascript 如何在<;td>;使用角度的表格字段,其中*ngFor是循环?,javascript,html,angular,angular6,ngfor,Javascript,Html,Angular,Angular6,Ngfor,实际上,在我的component.ts文件中,我使用了api来调用该方法,它将返回一个对象数组 我的问题开始于我试图使用ngIf in标记根据client.auditorGroup隐藏/显示列,因为它要么为true,要么为false(类型为boolean),但它不允许我访问: 第1代码: ngOnInit() { this.http.get('http://localhost:8080/api/selections') .subscribe((data: any[])

实际上,在我的component.ts文件中,我使用了api来调用该方法,它将返回一个对象数组

我的问题开始于我试图使用ngIf in标记根据client.auditorGroup隐藏/显示列,因为它要么为true,要么为false(类型为boolean),但它不允许我访问:

第1代码:

ngOnInit() {

   this.http.get('http://localhost:8080/api/selections')
      .subscribe((data: any[]) => {
        this.clients = data;
        console.log(this.clients);


        this.chRef.detectChanges();

        const table: any = $('table');
        this.dataTable = table.DataTable();
      });

  }
在我的html代码中,我使用了这个Edit-Delete,它是h

<table class="table table-bodered">

          <thead>
            <tr>
              <th>Mag No</th>
              <th>SelectionDate</th>
              <th> SelectedBy</th>
              <th>PanEximNumber</th>
              <th>Name</th>
              <th>Address</th>
              <th>PhoneNumber</th>
              <th>SelectionType</th>
              <th>Action</th>

            </tr>
          </thead>
          <tbody>
            <tr *ngFor="let client of clients">
              <td>{{client.selectionId}}</td>
              <td>{{client.selectionDate}}</td>
              <td>{{client.selectedBy}}</td>
              <td>{{client.panEximNumber}}</td>
              <td>{{client.name}}</td>
              <td>{{client.address}}</td>
              <td>{{client.phoneNumber}}</td>
              <td>{{client.selectionType}}</td>
              <td *ngIf="{{client.auditorGroup}}==false">Edit Delete</td>

            </tr>


          </tbody>

        </table>

杂志号
选择日期
选择人
PanEximNumber
名称
地址
电话号码
选择类型
行动
{{client.selectionId}
{{client.selectionDate}
{{client.selectedBy}
{{client.panEximNumber}
{{client.name}
{{client.address}
{{client.phoneNumber}
{{client.selectionType}
编辑删除

在使用
*ngIf
时删除插值
{}

 <td *ngIf="!client.auditorGroup">Edit Delete</td>
编辑删除

在使用
*ngIf
时删除插值
{}

 <td *ngIf="!client.auditorGroup">Edit Delete</td>
编辑删除

wowowo你是一个了不起的兄弟,你在很多方面都帮助过我。。请注意,我已经在fb中发送了u请求,接受它,兄弟,谢谢。但是,如果auditorGroup值为false,或者为绿色,我如何在内部显示整个红色?兄弟,看吧,你是个了不起的兄弟,你在很多方面都帮助过我。。请注意,我已经在fb中发送了u请求,接受它,兄弟,谢谢。但是,如果auditorGroup值为false,或者为绿色,我如何在内部显示整个红色?兄弟看到了吗