title: Getting selected value dropdown Angular 2
body: <p>struggling a bit to get selected value from drop down.</p>
  
  <p>As it is at the moment a value of <code>undefined</code>is returned.</p>
  
  <p>How can i get this selected value(opl.Opl_Id) in Angular 2?</p>
  
  <pre><code>&lt;form class="form-inline" novalidate&gt;
      &lt;select class="form-control" (change)="onChange(opl)"&gt;
            &lt;option [selected] = "opl.OplDescription == selectedOpl"  *ngFor="let opl of existingOpls" [ngValue]="opl.Opl_Id"&gt;{{opl.OplDescription}}&lt;/option&gt;
      &lt;/select
  </code></pre>
  
  <p></p>
  
  <pre><code>//component
   onChange(value) {
      console.log(value);
  }
  </code></pre>