* @description * Method called when the "submit" event is triggered on the form. * Triggers the `ngSubmit` emitter to emit the "submit" event as its payload. * * @param $event The "submit" event object
($event: Event)
| 332 | * @param $event The "submit" event object |
| 333 | */ |
| 334 | onSubmit($event: Event): boolean { |
| 335 | this.submittedReactive.set(true); |
| 336 | syncPendingControls(this.form, this._directives); |
| 337 | this.ngSubmit.emit($event); |
| 338 | this.form._events.next(new FormSubmittedEvent(this.control)); |
| 339 | // Forms with `method="dialog"` have some special behavior |
| 340 | // that won't reload the page and that shouldn't be prevented. |
| 341 | return ($event?.target as HTMLFormElement | null)?.method === 'dialog'; |
| 342 | } |
| 343 | |
| 344 | /** |
| 345 | * @description |
no test coverage detected