I know this sounds silly, but I am working on an angular 2 app and at some point in the workflow, I want to submit a <form>
using the standard POST
method.
I do not want to call any AJAX or anything, I simply want to submit the form.
<form action="http://server.com/address/to/submit" method="post">
<input name="test" value="dummy" type="hidden">
<button type="submit">Submit</button>
</form>
When I put the above code outside of any directive (so, in the index.html
), the form submits as expected.
However, if the above code is inside a directive, it does not submit.
I understand that my angular application would be terminated at the time the user hits submit
, but that is OK for my use case.