I have a form on an Angular2 webpage.
When I hit submit on the form, I\'d like the equivalent of \" method=\"post\".....> to happen.
That is, the action scr
I use the pure Angular JS html to implement this requirement.
<form ngNoForm action="https://your_url" target="_blank" method="POST">
<input hidden name='backEndUrl' [(ngModel)]="parameters['backEndUrl']">
<input hidden name='bankNumber' [(ngModel)]="parameters['bankNumber']">
...
<input hidden name='version' [(ngModel)]="parameters['version']">
<div class="container text-center mt-10">
<button class="btn-primary" type="submit" onclick="submit()">send</button>
</div>
</form>
Thanks to the angular2-forms tag which showed up as an option when I posted this, I think I have found the answer at Angular2 ngNoForm and also do angular form validation
There is a (rather undocumented) option on ngForm "ngNoForm" which removes the automatic ngForm handling from this specific form. This gives me back the standard use of the Submit button, and gets the behaviour I need.