Skip to content
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

Closed
wants to merge 5 commits into from
Closed

feat(forms): add the submitted flag to NgForm & NgFormModel #7449

wants to merge 5 commits into from

Conversation

antonmoiseev
Copy link
Contributor

@antonmoiseev
Copy link
Contributor Author

The failing issue seems unrelated to this PR

@kara
Copy link
Contributor

kara commented May 23, 2016

@antonmoiseev Can you rebase this?

@mhevery mhevery closed this in 420e83a May 26, 2016
@fxck
Copy link

fxck commented May 26, 2016

Thank you!!

@antonmoiseev antonmoiseev deleted the issue2960 branch May 26, 2016 20:18
KiaraGrouwstra pushed a commit to KiaraGrouwstra/angular that referenced this pull request Jun 21, 2016
@rmcsharry
Copy link

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.form.submitted = false;
wouldn't that then prevent the validation code from firing?

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants