title: Ng Select dropdown with condition
body: <p>I need to display the <strong>purchaseOrderStatusName</strong> in a <strong>NgSelect dropdown</strong>. In <strong>API</strong> different status values are available such as: <strong>OPEN,RECEIVED,CANCELLED</strong>. </p>
  
  <p><strong>TS file:</strong></p>
  
  <pre><code>  getAllPurchaseOrders() {
      this.purchaseOrderService.getAllPurchaseOrders().subscribe(
        data =&gt; { this.formModel.schema.purchaseOrders['purchaseOrders'] = data; 
      });
    }
  </code></pre>
  
  <p><strong>Ng-Select Drop Down:</strong></p>
  
  <pre><code>&lt;ng-select [items]=" formModel.schema.purchaseOrders['purchaseOrders']" bindLabel="referenceNumber" 
  bindValue="id" placeholder="Select PO" clearAllText="Clear" formControlName="purchaseOrderId"&gt;
  
     &lt;ng-template ng-label-tmp let-item="item"&gt;
        &lt;span [ngOptionHighlight]="search"&gt;
            {{ item.referenceNumber +'-'+ item.purchaseOrderStatusName}}
       &lt;/span&gt;
     &lt;/ng-template&gt;
     &lt;ng-template ng-option-tmp let-item="item" let-search="searchTerm" let-index="index"&gt;
        &lt;span [ngOptionHighlight]="search"&gt;
            {{ item.referenceNumber +'-'+ item.purchaseOrderStatusName}}
        &lt;/span&gt;
     &lt;/ng-template&gt;
  
  &lt;/ng-select&gt;
  </code></pre>
  
  <p>I got all values in <strong>formModel.schema.purchaseOrders['purchaseOrders']</strong>. Now all Reference Number is displaying.</p>
  
  <p><strong>Question:-</strong></p>
  
  <p>Now how to display the <strong>referenceNumber</strong> where the <strong>purchaseOrderStatusName= "OPEN"</strong> </p>
  
  <p>Instead of giving condition in NgSelect dropdown, is there any way to give a condition in get method itself?</p>