[ Web Proxy ]
URL:
Viewing: https://angular.dev/api/forms/signals/FieldTree [Back]  [Original]

FieldTree Angular Skip to main content
menu
close
more_horiz
menuAPI
@angular/forms/signals

FieldTree

Type Alias
stablesince v22.0

An object that represents a tree of fields in a form. This includes both primitive value fields (e.g. fields that contain a string or number), as well as "grouping fields" that contain sub-fields. FieldTree objects are arranged in a tree whose structure mimics the structure of the underlying data. For example a FieldTree<{x: number}> has a property x which contains a FieldTree<number>. To access the state associated with a field, call it as a function.

On this page

    arrow_upward_alt Back to the top

    API

        
          type FieldTree<TModel, TKey extends string | number = string | number, TMode extends 'writable' | 'readonly' = 'writable'> = (() => [TModel] extends [AbstractControl]    ? CompatFieldState<TModel, TKey, TMode>    : FieldStateByMode<TModel, TKey, TMode>) &    // Children:    (TModel extends AbstractControl      ? object      : TModel extends ReadonlyArray<infer U>        ? ReadonlyArrayLike<MaybeFieldTree<U, number, TMode>>        : TModel extends Record<string, any>          ? Subfields<TModel, TMode>          : object)
        
        
    Jump to details

    Web Proxy Viewer  |  New URL  |  Original Page