title: Accessing an hidden input field in angular 2
body: <p>I am trying to get the value of an input field. I get undefined with the if condition on the hidden field. I have the same condition in  element which triggers the function. It works when i tried  it without *ngIf="fileLoadedFlag" in input element. I don`t understand what may be the problem ?</p>
  
  <pre><code> &lt;input type="hidden" *ngIf="fileLoadedFlag" [value]="pictureName" #hiddenPicAccessor /&gt;
   &lt;span *ngIf="fileLoadedFlag" &gt;{{pictureName}} &lt;/span&gt;
  &lt;i *ngIf="fileLoadedFlag" (click)="removePicture(hiddenPicAccessor)" class="fa fa-times fa-2x" style="color:red" &gt;&lt;/i&gt;
  </code></pre>
  
  <p>And my test code </p>
  
  <pre><code>  removePicture(hiddenPicAccessor){
      alert(hiddenPicAccessor);
    }
  </code></pre>