-
Notifications
You must be signed in to change notification settings - Fork 25.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(forms): add the submitted flag to NgForm & NgFormModel #7449
Conversation
The failing issue seems unrelated to this PR |
@antonmoiseev Can you rebase this? |
Thank you!! |
In Angular 1.x it was possible to set submitted = false. With this code, there is only a getter, so we cannot set the value from code. Why is that useful? In some situations you want a cancel button to 'dismiss' the form and abandon the input/edit operation. However, if a field has focus that will cause validation to fire. A good example/use case is a form inside a modal, where the cancel button also closes the modal. However, if the validation fires, the cancel button must be clicked twice. SO question on this here. I think if in the onCancel click handler we could
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds the
submitted
flag to the Forms APIThe feature is described in Add the submitted flag to the Forms API #2960
No breaking changes
Previously closed PR feat(forms): add the submitted flag to NgForm and NgFormModel directives #5656