W3cubDocs

/Angular

metadata

Sets a value for the MetadataKey for this field.

API

function metadata<
  TValue,
  TKey extends MetadataKey<any, any, any>,
  TPathKind extends PathKind = PathKind.Root,
>(
  path: SchemaPath<TValue, 1, TPathKind>,
  key: TKey,
  logic: NoInfer<LogicFn<TValue, MetadataSetterType<TKey>, TPathKind>>,
): TKey;

Description

Sets a value for the MetadataKey for this field.

This value is combined via a reduce operation defined by the particular key, since multiple rules in the schema might set values for it.

Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/forms/signals/metadata