HTML Form in Angular Component Template not submitting


Aleksandar Petrushev

I have a form in an Angular component's template which is not submitting. I have tried everything from removing the styles, all the classes, all surrounding divs and all code from the .ts file but nothing seems to be working. When I move the form in a new file it makes the POST call to the endpoint, but when it is in the project file it doesn't submit (doesn't make a request, I'm looking in the Network tab of Chrome's Dev tools). For simplicity, as I said I have removed most of the code and left only the form controls. This is the code

<form action="" method="POST">
<input name="name" type="text" required>
<input name="email" type="email" required>
<textarea name="message" rows="5" required></textarea>
<button type="submit">Submit</button>

Continue reading...