I have an old server that processes form data as request parameters. We put angular2 on the cutting edge. I want to submit an angular2 form so that all fields appear as query parameters, so the previous backend should not be changed. For this I have:
<form ngNoForm action="http://localhost/config/api/v1/angular/submit" target="_blank" method="POST">
But I also want to use angular2 form validation on the submit button:
<form #f="ngForm" ngNoForm action="http://localhost/config/api/v1/angular/submit" target="_blank" method="POST">
<button type="submit" [disabled]="!f.form.valid" class="small round">Submit</button>
However, this will not work - angular2 complains about having # f = "ngForm" when declaring ngNoForm.
Is there a way to make the form validate angular2 as usual, and also submit the form as normal request parameters?
source
share