根据 angular 6 中的条件隐藏相同的行值?

Hide same row value based on condition in angular 6?

code for popup,how to write *ngIf condition to hide same row group and display other group .Here i am passing and displaying group, i just need to hide respective request group. GroupRequestDesc have all group values.

 <tr>
    <td *ngFor="let value of GroupRequestDesc;let $index=index " style="padding-right: 15px;">                             
       <label for="checkbox_group2" class="checkbox cb_pad" style="width: 180px;display:inline-block;">
           <input id="checkbox_group2" type="checkbox" value="{{value.nxReqGroupId}}" (change)="checkboxVisibility(value.ReqGroupId,$event)"/><i class="skin"></i><span>{{value.nxReqGroupDesc}}</span>
       </label>
    </td>
<tr>

And here is my function through which I am passing details to the popup for display:

passReqIdforcopytogroup(nxRequestId,solutionData,groupData){
        this.ReqId = RequestId;
        this.ReqGroupId = groupData;
        this.GroupRequestDesc = groupData;
        this.SolutionId = solutionData.SolutionId;
        this.ReqGroupName = solutionData.ReqGroupName;
    }

这里我想要实现的是,当我点击提交按钮时,相应的请求组不应显示在下一个弹出窗口中,其余所有其他组应显示在 popup.how 中,我可以实现吗,请有人帮助我对此。 单击提交时,我将显示弹出窗口,该弹出窗口应显示剩余组

你可以使用 ng-if 来达到这个目的

这里是 HTML 代码:

  passDataToPopup(group, reqId){
    console.log(group, reqId);
    let remainingGroups = group.filter(ele=> ele.ReqId != reqId);
    console.log(remainingGroups, 'remaining reqestids of group');

  }
    <td>
        <button class="btn-success" 
         (click)= "passDataToPopup(groupRowData.requestDetails, requestDetailData.ReqId)">submit</button>
    </td>

希望对您有所帮助。