Shoaib Anwar
Shoaib Anwar

Reputation: 849

Angular 6 how can apply condition correctly on table row of html

I want to show row of table only when my variable value is equal to accepted

<tr *ngIf="{{rfq.status}}===Accpeted" >
        <td>Assign To Staff Member</td>
        <td>
          <div>
            
            <select (change)="Selected($event)">
              
              <option *ngFor="let group of groups" [value]="group.id">
                {{group.name}}
              </option>
            </select>
          </div>
          <input type="button" (click)="getVal()" value="Assign"/>
      </td>

What is correct way to do, I want to show row only when rqf.status === Accepted, When i am doing with other parameters is working like

<tr *ngIf="quotations || quotations.length" >
        <td>Assign To Staff Member</td>
        <td>
          <div>
            
            <select (change)="Selected($event)">
              
              <option *ngFor="let group of groups" [value]="group.id">
                {{group.name}}
              </option>
            </select>
          </div>
          <input type="button" (click)="getVal()" value="Assign"/>
      </td>
    
      </tr>

Upvotes: 0

Views: 1153

Answers (1)

mbojko
mbojko

Reputation: 14679

Ditch the {{, and add single quotes:

<tr *ngIf="rfq.status === 'Accepted'">

Upvotes: 1

Related Questions