MCPcopy
hub / github.com/angular/angular / onSubmit

Method onSubmit

packages/forms/signals/src/directive/form_root.ts:43–54  ·  view source on GitHub ↗
(event: Event)

Source from the content-addressed store, hash-verified

41 readonly fieldTree = input.required<FieldTree<T>>({alias: 'formRoot'});
42
43 protected onSubmit(event: Event): void {
44 event.preventDefault();
45
46 untracked(() => {
47 const fieldTree = this.fieldTree();
48 const node = fieldTree() as FieldState<unknown> as FieldNode;
49
50 if (node.structure.fieldManager.submitOptions) {
51 submit(fieldTree);
52 }
53 });
54 }
55}

Callers

nothing calls this directly

Calls 4

untrackedFunction · 0.90
submitFunction · 0.90
preventDefaultMethod · 0.45
fieldTreeMethod · 0.45

Tested by

no test coverage detected