Skip to content

58894/fix-ng-model-submit-reset-events#60887

Closed
gabrielbergoc wants to merge 1 commit intoangular:mainfrom
gabrielbergoc:58894/fix-ng-model-submit-reset-events
Closed

58894/fix-ng-model-submit-reset-events#60887
gabrielbergoc wants to merge 1 commit intoangular:mainfrom
gabrielbergoc:58894/fix-ng-model-submit-reset-events

Conversation

@gabrielbergoc
Copy link
Copy Markdown
Contributor

@gabrielbergoc gabrielbergoc commented Apr 16, 2025

Currently, only forms created with FormGroupDirective emit events on form submission and resetting. This commit extends this behavior to Template-driven forms also.

Related to #58894

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Only Reactive Forms emit events FormSubmittedEvent and FormResetEvent.

Issue Number: #58894

What is the new behavior?

Now Template-Driven Forms also emit FormSubmittedEvent and FormResetEvent.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Tests added, all tests passed.

@pullapprove pullapprove bot added the requires: TGP This PR requires a passing TGP before merging is allowed label Apr 16, 2025
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: docs Related to the documentation area: build & ci Related the build and CI infrastructure of the project area: common/http Issues related to HTTP and HTTP Client area: compiler Issues related to `ngc`, Angular's template compiler area: core Issues related to the framework runtime labels Apr 16, 2025
@ngbot ngbot bot added this to the Backlog milestone Apr 16, 2025
@angular-robot angular-robot bot added area: server Issues related to server-side rendering area: i18n Issues related to localization and internationalization area: router area: docs-infra Angular.dev application and infrastructure area: bazel Issues related to the published `@angular/bazel` build rules area: language-service Issues related to Angular's VS Code language service area: devtools area: upgrade Issues related to AngularJS → Angular upgrade APIs area: dev-infra Issues related to Angular's own dev infra (build, test, CI, releasing) area: service-worker Issues related to the @angular/service-worker package area: benchpress area: animations area: migrations Issues related to `ng update`/`ng generate` migrations area: forms area: common Issues related to APIs in the @angular/common package labels Apr 16, 2025
@angular-robot angular-robot bot removed area: server Issues related to server-side rendering area: i18n Issues related to localization and internationalization labels Apr 16, 2025
@JeanMeche JeanMeche removed area: benchpress area: animations area: common Issues related to APIs in the @angular/common package area: router area: language-service Issues related to Angular's VS Code language service area: bazel Issues related to the published `@angular/bazel` build rules area: service-worker Issues related to the @angular/service-worker package area: upgrade Issues related to AngularJS → Angular upgrade APIs area: dev-infra Issues related to Angular's own dev infra (build, test, CI, releasing) area: migrations Issues related to `ng update`/`ng generate` migrations area: devtools area: docs-infra Angular.dev application and infrastructure labels Apr 16, 2025
@gabrielbergoc gabrielbergoc force-pushed the 58894/fix-ng-model-submit-reset-events branch 3 times, most recently from 7c89a32 to 17ec3f0 Compare April 16, 2025 15:01
@JeanMeche JeanMeche changed the base branch from 19.2.x to main April 16, 2025 15:04
@JeanMeche
Copy link
Copy Markdown
Member

JeanMeche commented Apr 16, 2025

Hi, we need your change to target the main branch. We then backport it automatically to the current patch version during the merge process

@gabrielbergoc
Copy link
Copy Markdown
Contributor Author

@JeanMeche I did a rebase, but maybe I did it wrong..? There are 15 other commits on the pull request now, is that right?

@JeanMeche
Copy link
Copy Markdown
Member

There should be a single commit, you likely didn't rebase correctly.

Currently, only forms created with `FormGroupDirective` emit events on
form submission and resetting. This commit extends this behavior to
Template-driven forms also.

Related to angular#58894
@gabrielbergoc
Copy link
Copy Markdown
Contributor Author

@JeanMeche fixed it

@pkozlowski-opensource
Copy link
Copy Markdown
Member

This PR was merged into the repository by commit be99562.

The changes were merged into the following branches: main, 19.2.x

@angular-automatic-lock-bot
Copy link
Copy Markdown

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: forms target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants