This happens inside my angular 5 app:
I have this form, which works well:
<form name="pdfForm" method="post" [action]="pdfUrl" target="_blank">
<input type="hidden" name="data" [value]="data">
<button type="submit">
Download as Pdf
</button>
</form>
When I add the Forms Module to the application (which I need for another form) however, the above form stops working!
Does anyone know why? And what can I do about it?
I found the answer myself. Angular seems to provide a ngNoForm directive | attribute (?), although you won't find it in the docs (which is stupid by the way).
I added it to my plunk, and it works now:
<form ngNoForm name="pdfForm" method="post" action="/goanywhere"
target="_blank">
<input type="hidden" name="data" value="mydata">
<button type="submit">
Download as Pdf
</button
</form>
https://plnkr.co/edit/0HULN4jvTicnmscK7D0o?p=preview
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With