You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So there seem to be a few issues submitting forms.
I can only attach the submit to an ng-click on a button, and when I press enter it doesn't get caught.
Ideally I want to use ng-submit to declare the function that should be fired, and able to submit via enter OR pressing the submit button. Both ways of submitting should be blocked by the validation.
Thanks for the response. And ng-submit is coming at some point? :)
Yeah ended up doing that, but then put the function + valid check in ng-submit too, feels a bit hacky though but can't guarantee someone is going to actually 'click'
So there seem to be a few issues submitting forms.
I can only attach the submit to an
ng-click
on a button, and when I press enter it doesn't get caught.Ideally I want to use
ng-submit
to declare the function that should be fired, and able to submit via enter OR pressing the submit button. Both ways of submitting should be blocked by the validation.https://plnkr.co/edit/nwTEuxuTMmpEc4hrFwGp?p=preview
Without entering anything, you can hit enter, and the
submitYo
function is fired regardless of validation status.Also when ensuring the form validates, hitting the button will only run the click event, not the one specified on form submit.
Any ideas?
The text was updated successfully, but these errors were encountered: