What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Angular Signal Forms field metadata is reactive, schema-contributed data attached to an individual field. Use metadata(path, key, logic) to add a value, define a reducer when several rules may contribute, and read the result from field state. Angular’s API reference marks metadata() stable since Angular v22.0.
What field metadata means in Angular Signal Forms
Field metadata is a way for schema rules to associate additional values with a form field. The value can depend on the field’s current state or on other fields, making it useful for application-specific information that should react as form data changes. Angular’s built-in constraint validators, including required() and min(), also use this metadata system internally. See Angular’s Field metadata guide.
As an Amazon Associate I earn from qualifying purchases.
This feature is specific to Signal Forms. It is not Angular compiler metadata or TypeScript decorator/reflection metadata; those are separate mechanisms.
How to contribute metadata from a schema
Create a metadata key once and share or import that same key wherever the schema contributes the value and the field reads it. createMetadataKey<T>() gives the key its value type. Each call creates a distinct key, even if two calls use the same type parameter.
#1 Best Overall
A schema rule contributes a value with metadata(path, key, logic). Its callback receives field context, including the field value as a signal, the field’s FieldState, and methods for reading other fields. Signals read inside the callback become reactive dependencies, so the contribution can be recalculated when those values change. The exact function signature and API details are documented in Angular’s metadata API reference.
Choose how multiple contributions are combined
A metadata key without a reducer uses override semantics by default. If more than one schema rule contributes to that key, the default behavior can discard an earlier contribution. Choose a reducer when the application needs to combine values instead of allowing one to override another.
Rank #2
- Override: use the default behavior when a later contribution should take precedence.
- Aggregation or custom combination: provide a reducer when contributions should be combined according to application rules. Angular’s field metadata guide describes built-in reducers and custom reducer creation.
The reducer is part of the key’s metadata behavior, so decide how contributions should interact before relying on multiple rules to add values.
Read metadata from a field
Use hasMetadata(key) when registration is optional or not guaranteed. It indicates whether a schema rule registered the key on that field. Calling metadata(key) returns undefined if no rule registered it; when registered, it returns a signal containing the reduced value.
Rank #3
- If registration is optional, check
hasMetadata(key)before reading. - If the schema guarantees registration, read the metadata directly or use optional chaining where appropriate.
- Even when the key is registered, account for the signal’s inner value being
undefinedif the reducer or contributions allow that.
Ordinary metadata and managed metadata
Ordinary metadata represents a reactive value contributed by schema rules and exposed through a signal. Managed metadata is intended for lifecycle-aware objects associated with a field, such as resources, effects, or service handles. Its key-creation function receives field state and a signal of contributions, then stores the object it returns as-is rather than wrapping it in computed(). Use the managed form when the associated object needs lifecycle-aware handling rather than simply representing a derived value.
Do not confuse field metadata with compiler or decorator metadata
| Term | What it describes | Relevant documentation |
|---|---|---|
| Signal Forms field metadata | Reactive, per-field values contributed by schema rules and read from field state. | Angular Field metadata |
| Angular compiler metadata | Compiler-related information used by Angular tooling and template compilation, including annotation emission and .metadata.json output. |
Angular compiler options |
| TypeScript decorator metadata | Experimental decorator-related type metadata options and examples involving reflect-metadata. |
TypeScript Decorators |
Only the first row is the Signal Forms field feature described here; the other two are separate compiler and language mechanisms.
Quick Recap
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problems




