title: ng-select Get object as selected value from
body: <p>I'm using ng-select (NgSelectModule from '@ng-select/ng-select')ץ
  This is my code:</p>
  
  <pre><code> &lt;ng-container *ngFor="let validFilter of validFiltersData; let i = index" &gt;
                  &lt;div *ngIf="validFilter.Values &amp;&amp; validFilter.Values.length &gt; 0" class=" filter col-md-4 "&gt;
                          &lt;ng-select [items]="validFilter.Values" bindLabel="Text" bindValue="ID" (change)= "onFilterValueChage($event, validFilter)" class="input-md" 
                          [(ngModel)]="validFilter.selectedValue"&gt;&lt;/ng-select&gt;
                      &lt;/div&gt;
              &lt;/ng-container&gt;
  </code></pre>
  
  <p><strong>validFiltersData is an array of FilterData</strong>:</p>
  
  <pre><code>export class FilterData 
  {
      Name : string;
      FormattedName : string = null;
      Values : Filter[];
      selectedValue : Filter = null;
      ...
  }
  </code></pre>
  
  <p>and <strong>Filter</strong>:</p>
  
  <pre><code>export class Filter 
  {
      public ID: number;
      public Text: string;
      ....
  }
  </code></pre>
  
  <p>I'm trying to get selected value as an object (Filter) that contains both ID and Text, but I always <strong>get only the ID</strong>.</p>
  
  <p>How can I get the all Filter as selected value ?</p>