• Overview
@angular/forms/signals/compat

extractValue

function

API

function extractValue<T>(field: FieldTree<T>): RawValue<T>;function extractValue<T>(  field: FieldTree<T>,  filter: ExtractFilter,): DeepPartial<RawValue<T>>;
function extractValue<T>(field: FieldTree<T>): RawValue<T>;

Utility to unwrap a FieldTree into its underlying raw value.

This function is recursive, so if the field tree represents an object or an array, the result will be an object or an array of the raw values of its children.

@paramfieldFieldTree<T>

The field tree to extract the value from.

@returnsRawValue<T>
function extractValue<T>(field: FieldTree<T>, filter: ExtractFilter): DeepPartial<RawValue<T>>;

Utility to unwrap a FieldTree into its underlying raw value.

This function is recursive, so if the field tree represents an object or an array, the result will be an object or an array of the raw values of its children.

@paramfieldFieldTree<T>

The field tree to extract the value from.

@paramfilterExtractFilter

Criteria to include only fields matching certain state (dirty, touched, enabled).

@returnsDeepPartial<RawValue<T>>
Jump to details