• Overview
@angular/forms/signals

property

function

API

function property<TValue, TData, TPathKind extends PathKind = PathKind.Root>(
  path: FieldPath<TValue, TPathKind>,
  factory: (ctx: FieldContext<TValue, TPathKind>) => TData,
): Property<TData>;
function property<TValue, TData, TPathKind extends PathKind = PathKind.Root>(
  path: FieldPath<TValue, TPathKind>,
  prop: Property<TData>,
  factory: (ctx: FieldContext<TValue, TPathKind>) => TData,
): Property<TData>;
function property<TValue, TData, TPathKind = PathKind.Root>(path: FieldPath<TValue, TPathKind>, factory: (ctx: FieldContext<TValue, TPathKind>) => TData): Property<TData>;

Creates a new Property and defines the value of the new property for the given field.

@parampathFieldPath<TValue, TPathKind>

The path to define the property for.

@paramfactory(ctx: FieldContext<TValue, TPathKind>) => TData

A factory function that creates the value for the property. This function is not reactive. It is run once when the field is created.

@returnsProperty<TData>
function property<TValue, TData, TPathKind = PathKind.Root>(path: FieldPath<TValue, TPathKind>, prop: Property<TData>, factory: (ctx: FieldContext<TValue, TPathKind>) => TData): Property<TData>;

Defines the value of a Property for a given field.

@parampathFieldPath<TValue, TPathKind>

The path to define the property for.

@parampropProperty<TData>

The property to define.

@paramfactory(ctx: FieldContext<TValue, TPathKind>) => TData

A factory function that creates the value for the property. This function is not reactive. It is run once when the field is created.

@returnsProperty<TData>
Jump to details