title: passing variable from ngFor to the component's method
body: <p><strong>What I want to achieve:</strong></p>
  
  <p>Everytime the user selects some option on upper-select in the code below, I want to execute the component's method onSelectSampleType with the selected object as parameter which sets some public property of component to the passed parameter.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;select (change)="onSelectSampleType(SampleType)"&gt;
    &lt;option  *ngFor="let SampleType of sampleTypeList"&gt;{{ SampleType }}&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;select *ngIf="selectedSample""&gt;
    &lt;option *ngFor ="let subType of selectedSampleType.subType"&gt;{{ subType }}&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p><strong>Problem:</strong>
  the SampleType parameter in onSelectSampleType() method which is supposed to capture SampleType of ngFor directive is capturing nothing and passing undefined value. I think the scope of SampleType variable inside ngfor directive is just limited to  tag.</p>
  
  <p>Is there any way to accomplish what I want to achieve?</p>