• Overview
@angular/forms/signals

RootFieldContext

interface

The base field context that is available for all fields.

API

    
      interface RootFieldContext<TValue> {  readonly value: Signal<TValue>;  readonly state: ReadonlyFieldState<TValue, string | number>;  readonly fieldTree: ReadonlyFieldTree<TValue, string | number>;  valueOf<PValue>(p: SchemaPath<PValue, SchemaPathRules, Root>): PValue;  stateOf<PControl extends AbstractControl>(p: CompatSchemaPath<PControl, Root>): [PControl] extends [any] ? ReadonlyCompatFieldState<PControl, string | number> : never;  stateOf<PValue>(p: SchemaPath<PValue, SchemaPathRules, Root>): [PValue] extends [any] ? ReadonlyFieldState<PValue, string | number> : never;  fieldTreeOf<PModel>(p: SchemaPathTree<PModel, Root>): [PModel] extends [any] ? ReadonlyFieldTree<PModel, string | number> : never;  readonly pathKeys: Signal<readonly string[]>;}
    
    

value

Signal<TValue>

A signal containing the value of the current field.

state

ReadonlyFieldState<TValue, string | number>

The state of the current field.

fieldTree

ReadonlyFieldTree<TValue, string | number>

The current field.

valueOf

PValue

Gets the value of the field represented by the given path.

@parampSchemaPath<PValue, SchemaPathRules, Root>
@returnsPValue

stateOf

[PControl] extends [any] ? ReadonlyCompatFieldState<PControl, string | number> : never

Gets the state of the field represented by the given path.

@parampCompatSchemaPath<PControl, Root>
@returns[PControl] extends [any] ? ReadonlyCompatFieldState<PControl, string | number> : never

stateOf

[PValue] extends [any] ? ReadonlyFieldState<PValue, string | number> : never
@parampSchemaPath<PValue, SchemaPathRules, Root>
@returns[PValue] extends [any] ? ReadonlyFieldState<PValue, string | number> : never

fieldTreeOf

[PModel] extends [any] ? ReadonlyFieldTree<PModel, string | number> : never

Gets the field represented by the given path.

@parampSchemaPathTree<PModel, Root>
@returns[PModel] extends [any] ? ReadonlyFieldTree<PModel, string | number> : never

pathKeys

Signal<readonly string[]>

The list of keys that lead from the root field to the current field.

Jump to details