MCPcopy Index your code
hub / github.com/angular/angular / constructor

Method constructor

packages/forms/signals/src/field/node.ts:93–105  ·  view source on GitHub ↗
(options: FieldNodeOptions)

Source from the content-addressed store, hash-verified

91 private readonly pathNode: FieldPathNode;
92
93 constructor(options: FieldNodeOptions) {
94 this.pathNode = options.pathNode;
95 this.fieldAdapter = options.fieldAdapter;
96 this.structure = this.fieldAdapter.createStructure(this, options);
97 this.validationState = this.fieldAdapter.createValidationState(this, options);
98 this.nodeState = this.fieldAdapter.createNodeState(this, options);
99 this.metadataState = new FieldMetadataState(this);
100 this.submitState = new FieldSubmitState(this);
101 this.controlValue = this.controlValueSignal();
102 // We eagerly create metadata at the end of construction so that the node is fully constructed
103 // before metadata creation logic runs (which may access other states on the node).
104 this.metadataState.runMetadataCreateLifecycle();
105 }
106
107 focusBoundControl(options?: FocusOptions): void {
108 this.getBindingForFocus()?.focus(options);

Callers

nothing calls this directly

Calls 5

controlValueSignalMethod · 0.95
createStructureMethod · 0.65
createValidationStateMethod · 0.65
createNodeStateMethod · 0.65

Tested by

no test coverage detected