title: pass form input to api url angular
body: <p>I'm trying to pass data from input fields to an api url but it seems like I'm not doing it right.it passes the input to the api minus the form inputs. How can I pass the input to the api correctly? Here is my code:</p>
  
  <p>component:</p>
  
  <pre><code>export class AppComponent {
   constructor(private http: Http) { }
  age = ''
  phone = ''
  sex = ''
  number = ''
  amount = ''
  email = ''
  names = ''
    sendDetails(){
      this.http.get('http://example.api.com/step1.php?'+'age=this.age&amp;phone=this.phone&amp;sex=this.sex&amp;number=this.number&amp;amount=this.amount&amp;email=this.email&amp;names=this.names')
      .subscribe(value =&gt; {
        const submit = value
        console.log(submit);
  
      })
  
    }
  }
  </code></pre>
  
  <p>HTML  </p>
  
  <pre><code>&lt;input type="text" [(ngModel)]=age &gt;
  &lt;input type="text" [(ngModel)]=phone &gt;
  &lt;input type="text" [(ngModel)]=sex &gt;
  &lt;input type="text" [(ngModel)]=number &gt;
  &lt;input type="text" [(ngModel)]=amount &gt;
  &lt;input type="text" [(ngModel)]=email &gt;
  &lt;input type="text" [(ngModel)]=names &gt;
  &lt;button (click)=sendDetails()&gt; submit&lt;/button&gt;
  </code></pre>