How to submit form which contain <input type="file"/> in Angular 2
<p><strong>media.html</strong></p>

<pre><code>&lt;form #form="ngForm" (ngSubmit)="uploadFile(form.value)"&gt;
  &lt;input type="file" ngControl="inputFile" /&gt;
  &lt;input type="text" ngControl="name"/&gt;
  &lt;button type="submit" &gt;Upload&lt;/button&gt;
&lt;/form&gt;
</code></pre>

<p><strong>media.ts</strong></p>

<pre><code>uploadFile(fileUpload){
    console.log(fileUpload); // this 
    this.mediaService.addMedia(fileUpload).subscribe((r)=&gt; {
        console.log(r);
      },
      (error) =&gt; {
        console.log(error.text());
      }
    );
  }
</code></pre>

<p>in line : console.log("fileUpload"); . It print out that :</p>

<pre><code>inputFile:null

name: "asdasdasdasd"
</code></pre>

<p>this mean that I can't catch value of <strong></strong> to submit on my server . how to catch it ? thanks for help !</p>