title: ERROR TypeError: Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'
body: <p>I'm trying to create a FormData object from an html form</p>
  
  <pre><code>&lt;form #basicForm ="ngForm" (ngSubmit)="basicFormSubmit(basicForm.value)"&gt;
                              &lt;label for="name"&gt;Name&lt;/label&gt;
                              &lt;input id="name" name="name" class="form-control"
                                     ngModel&gt;
  
  
  
                              &lt;label for="age"&gt;Age&lt;/label&gt;
                              &lt;input type="number" name="age" id="age" class="form-control"
                               ngModel&gt;
  
  
  
                              &lt;button type="submit" class="btn btn-sm btn-primary"&gt;&lt;i class="fa fa-dot-circle-o"&gt;&lt;/i&gt; Submit&lt;/button&gt;                          
                      &lt;/form&gt;
  </code></pre>
  
  <p>Angular method controlling the form submission</p>
  
  <pre><code>basicFormSubmit(data){
    let formdata= new FormData(data);  
    console.log(formdata);
    this.http.post("http://localhost:8080/testproject",formdata).subscribe();
    }
  </code></pre>
  
  <p>But I'm getting the following error <code>ERROR TypeError: Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement</code></p>
  
  <p>How to resolve this issue?</p>