onSubmit(Values from form here?){
this.http.post("A URL", legacyURL).subscribe();
}
According to your question, if my understanding is correct, You want to pass parameters while making post request.
You can do something like this:
const val = this.form.value;
this.http.post('url', {
first_name: val.first_name,
last_name: val.last_name,
email: val.email,
})
.subscribe(response => {
});
You should use the HttpParams library to add multiple params in your request headers.
import { HttpClient, HttpParams } from '@angular/common/http';
onSubmit(values val){
let params = new HttpParams()
.set('username', val.username)
.set('password', val.password)
this.http.post("A URL", params).subscribe();
}