title: angular4 local variable issue for *ngFor
body: <p>I have a requirement where I have load multiple items using item list. Whenever you upload a file, upload file input has to hide and details of that file has to show like filename and other button. </p>
  
  <p>I implemented the scenario by using a localvariable, it works fine with one item, but when we have multiple items, its not working. 
  Assume if I have 3 itemList, if we click on 1st item fileupload button and upload a file, it loads filename and validate button, but if we do same process for 2nd item (after 1st process), after fileupload, 1st filename will be modified.</p>
  
  <p>View:</p>
  
  <pre><code>&lt;div id="userItemList" *ngFor="let item of itemList; let i=index"&gt;
      &lt;div&gt;
          &lt;span&gt;{{item.Id}}&lt;/span&gt;
          &lt;span&gt;{{item.Name}}&lt;/span&gt;
          &lt;span&gt;{{item.Count}}&lt;/span&gt;
      &lt;/div&gt;
      &lt;div&gt;
          &lt;input type="file" name="UploadFile" id="fileInput" #fileInput (change)="txtUploadFile($event,i)"&gt;
          &lt;div class="validate-file-div" #validateContent style="display:none"&gt;
              &lt;div class="file-name" #fileName&gt;&lt;/div&gt;
              &lt;span id="validate-csv-button" data-program-id="0" class="button"&gt;Validate&lt;/span&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My component look like:</p>
  
  <pre><code>import { Component, OnInit, ViewChild } from '@angular/core';
  
  @Component({
    selector: 'app-programs-manager',
    templateUrl: './ProgramsManager.component.html',
    styleUrls: ['./ProgramsManager.component.css'],
  })
  
  export class ProgramsManagerComponent implements OnInit {
  
      itemList = [{"Id":1,"Name":"Item1","Count":2},{"Id":2,"Name":"Item2","Count":2},{"Id":3,"Name":"Item3","Count":3}];
      @ViewChild("fileInput") fileInput;
      @ViewChild("validateContent") validateContent;
      @ViewChild("fileName") fileName;
  
      constructor() { }
  
      ngOnInit() {
      }
  
      txtUploadFile(event,index) {
          this.fileInput.nativeElement.style.display = "none";
          this.validateContent.nativeElement.style.display = "block";
          this.fileInput.nativeElement.innerHTML = event.target.files[0].name;
      }
  }
  </code></pre>
  
  <p>I feel local variable is giving problem,but don't know how to fix it. can anyone help me.
  Thanks in advance</p>