I'm migrating an old html page from jQuery to Angular, and it contains some old-school forms with <input type="submit">
. When I enriched my pages with the ng-app
directive, the old forms stopped working (I mean when you press the submit
buttons then nothing happens).
I searched for this problem and scanned the Angular docs too, but it seems that nobody is submitting forms anymore.
Any suggestions on how to bring those forms to life again without much keystrokes would be appreciated.
Currently the form has following markup:
<form name="form_upload" method="post" action="" enctype="multipart/form-data">
<input type="file" name="file">
<input type="submit" name="send" value="Upload">
</form>
All jQuery code I purged and starting fresh with Angular.
UPD:
I guess i now found cause, it's empty action
attribute, it seems empty action is not welcomed by standarts, but very convenient to use allowing you to submit form to the current page URL, is there Angular way to do it ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…