title: How to get path from file upload input in angular 4
body: <p>I want to upload an image and create a preview of it in angular 4. <br>
  The template is given below:<br></p>
  
  <pre><code>&lt;div&gt;
    &lt;input type="file" (onchange)="handleUpload($event)"&gt;
    &lt;img [src]="Logo" &gt;
  &lt;/div
  </code></pre>
  
  <p>I want to call a function <code>handleUpload()</code> whenever a file is chosen. This function sets the value of the variable <code>Logo</code> to the path of the file chosen. I am not able to get the path because the function <code>handleUpload($event)</code> is not called. <br>The component class is given below:<br></p>
  
  <pre><code> export class App {
   Logo:string;
  
   handleUpload(e):void{
      this.Logo = e.target.value;
  
   }
  
    constructor() {
  
    }
  }
  </code></pre>
  
  <p>I don't understand what is wrong with my code. <a href="https://plnkr.co/edit/ZroQeV?p=preview" rel="noreferrer"><strong>Demo</strong></a></p>