Moving from Reactive Forms to Signal Forms in Angular 22: A Migration Playbook for Large, Form-Heavy Apps

On this page32 sections
Picture a codebase with a few hundred forms. Checkout, supplier onboarding, warehouse receiving, claims intake, admin settings. Most of them were written over several years by different people, and each one has its own little web of valueChanges subscriptions that enable this field, disable that one and swap validators when a checkbox flips. Nobody wants to touch the receiving screen because the last change broke over-receipt validation for a week.
Angular 22 made Signal Forms stable, and teams in that position are asking the same question: do we rewrite all of this?
Short answer: no. You can move a large Reactive Forms app to Signal Forms in Angular 22, but the safe way is incremental. Write new forms with Signal Forms, migrate existing forms when you are already changing them, and use the two official interop APIs (SignalFormControl and compatForm) as temporary bridges for forms too big to convert in one go. Reactive Forms are not deprecated, so there is no deadline.
This article walks through what Signal Forms is, how its concepts map to Reactive Forms, how to choose a migration path per form, and what to watch in production. Every API used in the code was checked against the angular.dev documentation for the v22 line. The business scenarios are hypothetical illustrations, not case studies.
What is Signal Forms in Angular?
Signal Forms is Angular's signal-based forms API, shipped in @angular/forms/signals. You keep form data in a writable signal (the model), pass it to form() along with a schema function that declares rules, and get back a field tree. The field tree mirrors the shape of your model. Each node is callable, and calling it returns a field state object made of signals such as value(), valid(), errors(), touched(), dirty(), pending(), disabled() and hidden().
In templates, you bind an input to a field with the [formField] directive. It keeps the DOM control and the model in sync in both directions.
A tiny example makes the shape clear:
import { Component, signal } from '@angular/core';
import { form, FormField, required, email } from '@angular/forms/signals';
@Component({
selector: 'app-newsletter',
imports: [FormField],
template: `
<input type="email" [formField]="signup.email" />
@if (signup.email().touched() && signup.email().invalid()) {
<p>{{ signup.email().errors()[0].message }}</p>
}
`,
})
export class Newsletter {
readonly model = signal({ email: '' });
readonly signup = form(this.model, (p) => {
required(p.email, { message: 'Email is required' });
email(p.email, { message: 'Enter a valid email address' });
});
}signup.email is the field. signup.email() is its state. p.email inside the schema is a schema path: a location you attach rules to, not a value.
Why does it exist when Reactive Forms already works?
Reactive Forms predates signals. Its state lives in FormControl, FormGroup and FormArray objects, change notifications come through RxJS observables, and dynamic behavior is usually imperative: subscribe to one control, call enable() on another, then setValidators() and updateValueAndValidity().
Signal Forms replaces that glue with declarations. A rule like "the damage note is required only when the line is marked damaged" becomes one line with a when condition that recomputes like a computed(). Your model is a plain signal, so there is no second copy of the data hiding inside a control tree, and types are inferred from it. This lines up with where Angular is heading: in v22, OnPush became the default change detection strategy, with the old default renamed Eager.
What is the status in Angular 22?
Signal Forms graduated from experimental to stable in Angular 22.0, released on June 3, 2026. The API reference pages for SignalFormControl, compatForm, FormRoot, validateHttp and applyWhenValue are all marked stable since v22.0.
Two version facts to plan around, from the official Version compatibility table:
| Angular | TypeScript | Node.js |
|---|---|---|
| 22.x | >=6.0.0 <6.1.0 | ^22.22.3, ^24.15.0 or ^26.0.0 |
TypeScript 5.9 and earlier are no longer supported, so the toolchain bump is its own piece of work. Do it before touching any forms.
If your team experimented with Signal Forms during v21, note that the directive was renamed during the experimental phase. Anything using [field] should now use [formField] and import FormField.
One more point the docs make plainly: the Signal Forms overview says the API works best in new applications built with signals, and that reactive forms remain a solid choice for existing apps. Take that seriously. Migration is an option, not an obligation.
How Reactive Forms concepts map to Signal Forms
The table below covers what you will reach for most often.
| Concern | Reactive Forms | Signal Forms (Angular 22) |
|---|---|---|
| Import path | @angular/forms | @angular/forms/signals (interop in @angular/forms/signals/compat) |
| Source of truth | The control tree | Your writable signal model |
| Template binding | formControlName, [formGroup] | [formField], [formRoot] |
| Built-in validators | Validators.required, .min, .pattern | required(), min(), max(), minLength(), email(), pattern() |
| Custom validation | ValidatorFn | validate() |
| Async validation | AsyncValidatorFn | validateHttp(), validateAsync() |
| Dynamic lists | FormArray, push(), removeAt() | An array in the model plus applyEach() |
| Conditional rules | setValidators() + updateValueAndValidity() | when option, applyWhen(), applyWhenValue() |
| Disable / enable | control.disable() | disabled() rule |
| Submission | (ngSubmit) handler | FormRoot + submission option, or submit() |
| Custom controls | ControlValueAccessor | FormValueControl / FormCheckboxControl |
| Status CSS classes | ng-valid, ng-dirty added automatically | None by default; opt in with provideSignalFormsConfig |
That last row catches teams out. If your global styles key off ng-invalid or ng-touched, migrated screens will silently lose their error styling unless you opt in (covered in step 3 below).
Which migration path should each form take?
Choose a strategy per form, not per app. There are four realistic options:
- Stay on Reactive Forms. Right for stable, well-tested forms that are not on the roadmap.
- Full migration. Rewrite the form with
form()and a schema. Right for small and medium forms you can test end to end. - Bottom-up with
SignalFormControl. Swap individual controls inside an existingFormGroupfor signal-backed ones. Right for large forms you cannot rewrite at once. - Top-down with
compatForm. Build the new form with a signal model, but keep an existingFormGroup(say, a shared address block) inside it. Right when a legacy section is reused across many screens.
This decision tree captures the reasoning:
Forms worth migrating early tend to share a few traits: lots of valueChanges subscriptions driving enable() or disable(), tangled cross-field rules, active feature work, and neighbors that already use signals. Forms to leave alone: anything in a release freeze, anything leaning on third-party controls you have not yet tested with [formField], and RxJS pipelines nobody fully understands.
A quick rule for interop: if a control relies on enable(), disable(), setValidators() or setErrors() from outside, it is not a good SignalFormControl candidate yet. Those methods are unsupported on it, as covered below.
A step-by-step migration plan
- Upgrade to Angular 22 first. Run
ng update @angular/core@22 @angular/cli@22and follow the Angular update guide. The v22 migration addsChangeDetectionStrategy.Eagerto components that did not set a strategy, so existing behavior is preserved. Fix any v21 experimental[field]usage now. - Inventory your forms. For each one, note its size,
FormArrayusage, async validators, customControlValueAccessorcomponents andvalueChangessubscriptions. Run each through the decision tree above. - Restore status classes if you need them. Register
provideSignalFormsConfig({ classes: NG_STATUS_CLASSES })in your application providers before migrating any screen.provideSignalFormsConfigcomes from@angular/forms/signals;NG_STATUS_CLASSEScomes from@angular/forms/signals/compat. - Migrate design-system controls. Convert shared inputs from
ControlValueAccessortoFormValueControl. Per the migration guide, these work in Reactive and template-driven forms without changes, so this step breaks nothing. - Build a shared schema library. Port your shared validators into reusable
schema()objects and keep errorkindvalues stable so tests and analytics keep working. - Write parity tests, then migrate. Capture current behavior (which fields are required when, which errors appear, what payload is posted) and run the same assertions against the new form.
- Release behind a feature flag. Compare submission success and validation failure rates between old and new versions.
- Remove the scaffolding. Delete the legacy component, interop wrappers and the flag once metrics hold steady.
The rest of this article fills in steps 4 through 6 with code.
Before and after: a warehouse receiving form
Here is the hypothetical scenario. A warehouse management system has a "receive purchase order" screen. A clerk enters a PO number and dock door, then one line per SKU with expected and received quantities. If a line is marked damaged, a damage note becomes required. Receiving more than 10% over the expected quantity is an error.
Before: Reactive Forms
// receiving-form.component.ts (Reactive Forms version)
import { Component, DestroyRef, inject } from '@angular/core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import {
AbstractControl, FormBuilder, ReactiveFormsModule, ValidationErrors, Validators,
} from '@angular/forms';
function overReceiptValidator(group: AbstractControl): ValidationErrors | null {
const expected = group.get('expectedQty')?.value ?? 0;
const received = group.get('receivedQty')?.value ?? 0;
return received > expected * 1.1 ? { overReceipt: true } : null;
}
@Component({
selector: 'app-receiving-form',
imports: [ReactiveFormsModule],
templateUrl: './receiving-form.component.html',
})
export class ReceivingFormComponent {
private readonly fb = inject(FormBuilder);
private readonly destroyRef = inject(DestroyRef);
readonly form = this.fb.nonNullable.group({
poNumber: ['', [Validators.required, Validators.pattern(/^PO-\d{6}$/)]],
dockDoor: [1, [Validators.required, Validators.min(1), Validators.max(40)]],
lines: this.fb.array([this.createLine()]),
});
get lines() {
return this.form.controls.lines;
}
createLine() {
const line = this.fb.nonNullable.group(
{
sku: ['', Validators.required],
expectedQty: [0, Validators.min(0)],
receivedQty: [0, Validators.min(0)],
damaged: [false],
damageNote: [{ value: '', disabled: true }],
},
{ validators: overReceiptValidator },
);
// Imperative glue: enable, disable and swap validators by hand.
line.controls.damaged.valueChanges
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe((damaged) => {
const note = line.controls.damageNote;
if (damaged) {
note.enable();
note.setValidators(Validators.required);
} else {
note.disable();
note.clearValidators();
}
note.updateValueAndValidity();
});
return line;
}
addLine() {
this.lines.push(this.createLine());
}
removeLine(index: number) {
this.lines.removeAt(index);
}
}It works. But look at what it costs: a group validator that reads controls by string name, one subscription per line, and three imperative calls to keep one field consistent.
After: Signal Forms
Start with the model and a reusable line schema. In a monorepo this might live at libs/receiving/receipt.schema.ts.
// receipt.schema.ts
import { disabled, min, required, schema, validate } from '@angular/forms/signals';
export interface ReceiptLine {
sku: string;
expectedQty: number;
receivedQty: number;
damaged: boolean;
damageNote: string;
}
export interface ReceiptModel {
poNumber: string;
dockDoor: number;
lines: ReceiptLine[];
}
export const emptyLine = (): ReceiptLine => ({
sku: '',
expectedQty: 0,
receivedQty: 0,
damaged: false,
damageNote: '',
});
export const receiptLineSchema = schema<ReceiptLine>((line) => {
required(line.sku, { message: 'SKU is required' });
min(line.expectedQty, 0);
min(line.receivedQty, 0, { message: 'Quantity cannot be negative' });
// Replaces the valueChanges subscription.
disabled(line.damageNote, { when: ({ valueOf }) => !valueOf(line.damaged) });
required(line.damageNote, {
message: 'Describe the damage',
when: ({ valueOf }) => valueOf(line.damaged),
});
// Cross-field rule: lives on receivedQty, reads expectedQty.
validate(line.receivedQty, ({ value, valueOf }) =>
value() > valueOf(line.expectedQty) * 1.1
? { kind: 'overReceipt', message: 'More than 10% over the expected quantity' }
: null,
);
});Then the component:
// receiving-form.ts (Signal Forms version)
import { Component, inject, signal } from '@angular/core';
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
import { firstValueFrom } from 'rxjs';
import {
applyEach, form, FormField, FormRoot, max, min, pattern, required,
} from '@angular/forms/signals';
import { emptyLine, ReceiptModel, receiptLineSchema } from './receipt.schema';
@Component({
selector: 'app-receiving-form',
imports: [FormField, FormRoot],
templateUrl: './receiving-form.html',
})
export class ReceivingForm {
private readonly http = inject(HttpClient);
readonly model = signal<ReceiptModel>({ poNumber: '', dockDoor: 1, lines: [emptyLine()] });
readonly receiptForm = form(
this.model,
(p) => {
required(p.poNumber, { message: 'PO number is required' });
pattern(p.poNumber, /^PO-\d{6}$/, { message: 'Use the format PO-123456' });
min(p.dockDoor, 1);
max(p.dockDoor, 40);
applyEach(p.lines, receiptLineSchema); // replaces per-item FormArray setup
},
{
submission: {
action: async (f) => {
try {
await firstValueFrom(this.http.post('/api/receipts', f().value()));
return; // success
} catch (err) {
if (err instanceof HttpErrorResponse && err.status === 409) {
return {
kind: 'duplicatePo',
message: 'This PO was already received',
fieldTree: f.poNumber,
};
}
return { kind: 'serverError', message: 'Could not save the receipt. Try again.' };
}
},
onInvalid: (f) => f().errorSummary()[0]?.fieldTree().focusBoundControl(),
},
},
);
addLine() {
this.model.update((m) => ({ ...m, lines: [...m.lines, emptyLine()] }));
}
removeLine(index: number) {
this.model.update((m) => ({ ...m, lines: m.lines.filter((_, i) => i !== index) }));
}
}<!-- receiving-form.html -->
<form [formRoot]="receiptForm">
<label>
PO number
<input [formField]="receiptForm.poNumber" />
</label>
@if (receiptForm.poNumber().touched() && receiptForm.poNumber().invalid()) {
@for (error of receiptForm.poNumber().errors(); track error.kind) {
<p class="error">{{ error.message }}</p>
}
}
<label>
Dock door
<input type="number" [formField]="receiptForm.dockDoor" />
</label>
@for (line of receiptForm.lines; track line; let i = $index) {
<fieldset>
<input [formField]="line.sku" placeholder="SKU" />
<input type="number" [formField]="line.expectedQty" />
<input type="number" [formField]="line.receivedQty" />
<label><input type="checkbox" [formField]="line.damaged" /> Damaged</label>
<textarea [formField]="line.damageNote"></textarea>
@for (error of line.receivedQty().errors(); track error.kind) {
<p class="error">{{ error.message }}</p>
}
<button type="button" (click)="removeLine(i)">Remove line</button>
</fieldset>
}
<button type="button" (click)="addLine()">Add line</button>
<button type="submit" [disabled]="receiptForm().submitting()">Save receipt</button>
</form>What changed, and why it matters
- Lists are just arrays.
applyEach(p.lines, receiptLineSchema)applies the line rules to every item, including ones added later. Adding and removing lines means updating the model signal. Nopush(), noremoveAt(). - Conditional logic is declared, not wired. The damage note needs two rules instead of a subscription. Disabled fields skip validation anyway, so the
whenonrequiredmainly documents intent. - Submission is built in.
FormRootsetsnovalidate, blocks the browser's default submit and runs thesubmissionaction. Before the action runs, interactive fields are marked touched and validation is checked. While it runs,submitting()istrue. - Server errors land on fields. Returning an error with
fieldTree: f.poNumberattaches it to that field. It clears automatically once the user edits the field. - Throwing is different from returning. If the action throws, the submit promise rejects. That is why the action catches HTTP failures and converts them into form errors.
Expected result: blurring an empty SKU shows "SKU is required". Ticking "Damaged" enables the note and makes it required. Entering 12 received against 10 expected shows the over-receipt message. A 409 from the API puts "This PO was already received" under the PO field.
Trade-off: the template still loops over errors by hand. In a real app, move error rendering into a design-system component so each screen does not repeat it.
Async validation without race conditions
In Reactive Forms, a reliable async validator usually means debounceTime, switchMap and careful cancellation. Signal Forms handles most of that for you. validateHttp() is built on httpResource, only runs after synchronous rules pass, sets pending() while in flight, and accepts a debounce option that throttles just its own request.
Add a SKU existence check inside receiptLineSchema:
import { validateHttp } from '@angular/forms/signals';
// inside receiptLineSchema
validateHttp(line.sku, {
debounce: 300,
request: ({ value }) =>
value() ? `/api/skus/${encodeURIComponent(value())}/exists` : undefined,
onSuccess: (res: { exists: boolean }) =>
res.exists ? null : { kind: 'unknownSku', message: 'SKU not found in the catalog' },
onError: () => ({ kind: 'skuCheckFailed', message: 'Could not verify SKU. Try again.' }),
});Three behaviors are worth knowing before you ship this:
- Returning
undefinedfromrequestskips the check. Use it for blank values. - Pending checks do not block submission by default. The
ignoreValidatorssubmission option defaults to'pending', which submits as long as nothing has failed, even if an async check is still running. If a field must be confirmed by the server before posting, setignoreValidators: 'none'. For autosaving drafts,'all'submits regardless. - There are two kinds of debounce. The
debounce()rule delays writing user input into the model, so everything downstream waits. Passing'blur'defers the update until the field is touched. Thedebounceoption onvalidateHttpdelays only that one request.
Because applyEach registers rules per item, each line gets its own validation request. On a receipt with hundreds of lines, consider validating SKUs on the server at submit time instead.
Conditional sections in a multi-step claims form
Insurance claim wizards are full of "if this, show those fields" logic. The key rule to remember: hidden() marks fields as hidden and excludes them from validation, but [formField] does not hide anything in the DOM. You still wrap the markup in @if.
A hypothetical example:
import { Component, signal } from '@angular/core';
import { applyWhen, form, FormField, hidden, required } from '@angular/forms/signals';
@Component({
selector: 'app-claim-third-party',
imports: [FormField],
template: `
<label><input type="checkbox" [formField]="claimForm.thirdPartyInvolved" /> Third party involved</label>
@if (!claimForm.thirdParty().hidden()) {
<input [formField]="claimForm.thirdParty.name" placeholder="Name" />
<input [formField]="claimForm.thirdParty.insurer" placeholder="Insurer" />
}
`,
})
export class ClaimThirdParty {
readonly claimModel = signal({
policyNumber: '',
thirdPartyInvolved: false,
thirdParty: { name: '', insurer: '' },
});
readonly claimForm = form(this.claimModel, (p) => {
required(p.policyNumber);
hidden(p.thirdParty, { when: ({ valueOf }) => !valueOf(p.thirdPartyInvolved) });
// Turn the whole group of rules on only when a third party is involved.
applyWhen(p.thirdParty, ({ valueOf }) => valueOf(p.thirdPartyInvolved), (tp) => {
required(tp.name);
required(tp.insurer);
});
});
}hidden() controls what the template shows, and applyWhen(path, condition, schemaFn) makes the rule group explicit. Hidden fields already skip validation, but stating the condition in applyWhen keeps the intent readable and still works if a designer later decides to keep the section visible but optional. For variant types, such as a vehicle claim versus a property claim modeled as a discriminated union, applyWhenValue() applies a schema only when a type guard matches.
For wizards, keep one model and one form for the whole claim, and render one step at a time. You can validate and submit a single step by calling submit() on a subtree, for example submit(this.claimForm.thirdParty, action).
Incremental migration with the official interop APIs
Bottom-up: SignalFormControl inside an existing FormGroup
SignalFormControl (from @angular/forms/signals/compat, stable since v22.0) is a FormControl backed by Signal Forms rules. It plugs into an existing FormGroup or FormArray, propagates value and validity upward, and syncs values in both directions
import { Component } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
import { email, FormField, required } from '@angular/forms/signals';
import { SignalFormControl } from '@angular/forms/signals/compat';
@Component({
selector: 'app-claimant-details',
imports: [ReactiveFormsModule, FormField],
template: `
<form [formGroup]="claimant">
<input formControlName="fullName" />
<!-- Bind the signal-backed control through its fieldTree -->
<input [formField]="emailControl.fieldTree" />
</form>
`,
})
export class ClaimantDetails {
readonly emailControl = new SignalFormControl('', (p) => {
required(p, { message: 'Email is required' });
email(p, { message: 'Enter a valid email address' });
});
readonly claimant = new FormGroup({
fullName: new FormControl('', { nonNullable: true, validators: Validators.required }),
email: this.emailControl,
});
}Three rules from the migration guide trip teams up:
- Bind with
[formField]="control.fieldTree", notformControlNameor[formControl]. - Pass a raw value, not a signal. The control creates its own signal internally and exposes it as
sourceValue. - Imperative state methods are unsupported and throw. That covers
enable(),disable(),addValidators(),removeValidators(),setValidators(),setErrors()andmarkAsPending(). Usedisabled(p, { when })andapplyWhen()in the schema instead. Search for these calls before you wrap a control.
Top-down: compatForm wrapping legacy controls
compatForm lets a signal model contain existing FormControl or FormGroup instances. Use it when, say, a shared address block built with Reactive Forms appears on many screens and you are not ready to rewrite it.
import { signal } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { required } from '@angular/forms/signals';
import { compatForm, extractValue } from '@angular/forms/signals/compat';
// Illustrative: in a real app, create these inside a component class.
const legacyAddress = new FormGroup({
street: new FormControl('', Validators.required),
city: new FormControl('', Validators.required),
});
const checkoutModel = signal({ customerName: '', shippingAddress: legacyAddress });
const checkoutForm = compatForm(checkoutModel, (p) => {
required(p.customerName);
});
// checkoutForm().value() still contains the FormGroup instance.
// extractValue(checkoutForm) returns plain data for your API payload.A few things to know:
- To render the legacy part, get the underlying group with
checkoutForm.shippingAddress().control()and bind its children with[formControl]. - Errors from legacy validators arrive as
CompatValidationErrorobjects. They have nomessage; the original error object sits incontext, so your error component needs a fallback based onkind. - Treat
compatFormas scaffolding. Test number and date inputs inside it carefully, and give every usage a removal ticket.
Design-system controls: from ControlValueAccessor to FormValueControl
For most enterprise apps, this is where the bulk of migration effort sits, and Angular 22 makes it work in both directions:
- Existing
ControlValueAccessorcomponents can be bound with[formField], for backward compatibility. - New
FormValueControlcomponents work in Signal, Reactive and template-driven forms without extra compatibility code.
So you can migrate controls first and forms later, in any order. Here is a quantity stepper for the receiving screen:
// quantity-stepper.ts (design-system library)
import { Component, input, model, output } from '@angular/core';
import { FormValueControl, ValidationError, WithOptionalFieldTree } from '@angular/forms/signals';
@Component({
selector: 'ds-quantity-stepper',
template: `
<button type="button" (click)="step(-1)" [disabled]="disabled() || readonly()">-</button>
<input
type="number"
[value]="value()"
(input)="value.set(+$any($event.target).value)"
(blur)="touch.emit()"
[disabled]="disabled()"
[readOnly]="readonly()"
[attr.aria-invalid]="invalid()"
/>
<button type="button" (click)="step(1)" [disabled]="disabled() || readonly()">+</button>
@if (touched() && invalid()) {
@for (error of errors(); track error.kind) {
<span class="ds-error" role="alert">{{ error.message }}</span>
}
}
`,
})
export class QuantityStepper implements FormValueControl<number> {
readonly value = model(0); // the only required member
readonly touched = input(false); // optional state inputs set by [formField]
readonly touch = output<void>(); // emit on blur so the field becomes touched
readonly disabled = input(false);
readonly readonly = input(false);
readonly invalid = input(false);
readonly errors = input<readonly WithOptionalFieldTree<ValidationError>[]>([]);
step(delta: number) {
this.value.update((v) => Math.max(0, v + delta));
}
}Usage is the same in both worlds: <ds-quantity-stepper [formField]="line.receivedQty" /> in a Signal Form, or <ds-quantity-stepper formControlName="receivedQty" /> in a legacy Reactive Form.
Points worth remembering:
- Emit
touchon blur. In v22,touchedis a read-only input andtouchis an output. Without the emit, the field never becomes touched, and adebounce(path, 'blur')rule never commits its value. If you adopted custom controls during v21 with a writabletouchedmodel, update them. - Controls display validation; they do not own it. Ship a companion
schema()next to the control and let consumers apply it. - Never implement both
ControlValueAccessorandFormValueControlon one component. - Test third-party wrappers. Angular Material's
matInputsupports Signal Forms in v22, but customMatFormFieldControlimplementations and other libraries deserve explicit tests before you migrate forms that depend on them.
Testing the migration
Because rules live in schemas, most tests do not need a rendered component. The one requirement is that form() needs an injection context. Pass { injector: TestBed.inject(Injector) } when you create the form directly, or use TestBed.runInInjectionContext() when the code under test calls form() itself. The official testing guide uses Vitest.
// receipt.schema.spec.ts
import { Injector, signal } from '@angular/core';
import { TestBed } from '@angular/core/testing';
import { form } from '@angular/forms/signals';
import { describe, expect, it } from 'vitest';
import { emptyLine, receiptLineSchema } from './receipt.schema';
describe('receiptLineSchema', () => {
it('requires a damage note only when the line is damaged', () => {
const model = signal(emptyLine());
const line = form(model, receiptLineSchema, { injector: TestBed.inject(Injector) });
expect(line.damageNote().disabled()).toBe(true);
line.damaged().value.set(true);
expect(line.damageNote().disabled()).toBe(false);
expect(line.damageNote().errors()).toEqual([expect.objectContaining({ kind: 'required' })]);
line.damageNote().value.set('Crushed carton');
expect(line.damageNote().valid()).toBe(true);
});
it('flags over-receipt above 10%', () => {
const model = signal({ ...emptyLine(), sku: 'A-1', expectedQty: 10, receivedQty: 12 });
const line = form(model, receiptLineSchema, { injector: TestBed.inject(Injector) });
expect(line.receivedQty().errors()).toEqual([expect.objectContaining({ kind: 'overReceipt' })]);
});
});Run it with ng test. If you added the validateHttp SKU check to this schema, provide provideHttpClient() and provideHttpClientTesting() in TestBed so the async rule has an HttpClient to use.
A layered plan keeps the migration honest:
| Layer | What it proves | How |
|---|---|---|
| Schema tests | Rules, conditions, error kind values | Isolated form() with an injector |
| Component tests | Binding, focus on invalid submit | TestBed.createComponent |
| Parity tests | Old and new forms post the same payload | Shared fixtures against both versions |
| End-to-end | Real journeys still work | Your existing Playwright or Cypress suite, unchanged |
Performance in large forms
Field state is made of signals, so templates that read field().invalid() update precisely, with or without Zone.js. That is a good fit for the OnPush default in v22. A few habits keep big forms fast:
- Read narrowly. The model is one signal, and every keystroke produces a new model object. A
computed()that reads the whole model reruns on every change. Read the specific field you need instead. - Debounce at the source. For search boxes or fields that feed expensive derived state,
debounce(path, 300)ordebounce(path, 'blur')cuts work before it starts. - Track rows by field.
@for (line of receiptForm.lines; track line)keeps row identity tied to the item, not the index.
There are no official benchmarks comparing Signal Forms and Reactive Forms on very large forms. Profile your worst screen (a 500-line receipt, for example) with Angular DevTools before and after, and do not assume a speedup.
Security: client rules are for users, not for attackers
- Revalidate everything on the server. Anyone can bypass
required()orpattern()with dev tools or a direct HTTP call. - Treat
hidden()anddisabled()as UI state, not authorization. A hidden field is still in the model. Strip fields the user may not edit when mapping to your API payload, and enforce permissions server-side. - Encode values in validation URLs with
encodeURIComponent, as in the SKU example. - Rate-limit async validation endpoints. "Is this email registered?" checks invite enumeration. Debounce on the client and throttle on the server.
- Keep credentials out of schemas. Attach auth tokens through an HTTP interceptor rather than in
validateHttprequest builders.
Rolling out across a large team
- Pilot one medium form owned by one squad, and compare how long the next feature change takes against a similar Reactive Forms screen.
- Write a short internal guide. The official model design guidance boils down to: initialize every field, avoid
undefinedand optional properties, use''for empty text andnullfor empty dates, and keep class instances out of the model. - Add review checks. Flag new
FormBuilderusage in new features, and flagenable()ordisable()calls nearSignalFormControl. - Ship behind flags and compare submission success and server-side validation rejections, grouped by error
kind. - Watch your error monitoring for new runtime errors from migrated screens, especially around routes that reuse detached views.
- Set a removal date for every interop usage.
Common mistakes
| Mistake | Fix |
|---|---|
Using [field] or [control] from old tutorials | Use [formField] and import FormField |
Forgetting to import FormField or FormRoot | Add them to the component's imports |
| Replacing the model signal with a new one | Call model.set() or model.update() instead |
Optional properties or undefined in the model | Initialize every field with '', 0, false or null |
Expecting hidden() to hide the DOM | Wrap markup in @if (!field().hidden()) |
| Assuming pending async checks block submit | Set ignoreValidators: 'none' where it matters |
Calling disable() on a SignalFormControl | Use a disabled() rule with when |
Losing ng-invalid styling | Register provideSignalFormsConfig({ classes: NG_STATUS_CLASSES }) |
| Treating client rules as security | Validate and authorize on the server |
Known limitations
- The official positioning is cautious. The docs still frame Signal Forms as the best fit for new signal-based apps.
- There is no automatic conversion. I found no official schematic that turns Reactive Forms into Signal Forms. The Migrating from Reactive Forms guide documents the interop APIs, and the conversion itself is manual. If you use AI tools for the mechanical parts, back them with parity tests.
- The interop layer is young.
SignalFormControlandcompatFormbecame stable in v22.0. Check the angular/angular issue tracker for open Signal Forms issues before relying on interop for numeric, date or heavily customized inputs. - Third-party libraries vary. Test each one with
[formField]before migrating forms that depend on it.
Frequently asked questions
Are Signal Forms stable in Angular 22?
Yes. Signal Forms moved from experimental to stable in Angular 22.0, released June 3, 2026. The API reference marks FormRoot, validateHttp, SignalFormControl and compatForm as stable since v22.0.
Are Reactive Forms deprecated?
No. Reactive Forms remain supported, and the Signal Forms overview calls them a solid choice for existing applications. Both APIs can live in the same app indefinitely.
What do I need to upgrade before using Signal Forms in Angular 22?
TypeScript must be at least 6.0.0 and below 6.1.0, and Node.js must be ^22.22.3, ^24.15.0 or ^26.0.0, according to the official version compatibility table.
What replaces FormArray in Signal Forms?
A plain array in the model, plus applyEach() in the schema for per-item rules. Add or remove items by updating the model signal, and iterate with @for (item of myForm.items; track item).
When should I use SignalFormControl instead of compatForm?
Use SignalFormControl to replace individual controls inside an existing FormGroup (bottom-up). Use compatForm when you are building a new signal-based form that must contain an existing FormGroup or FormControl (top-down). For small and medium forms you can test end to end, skip both and migrate the whole form.
Can my existing ControlValueAccessor components work with Signal Forms?
Yes. In Angular 22, [formField] can bind to ControlValueAccessor components for backward compatibility. For new or migrated controls, implement FormValueControl or FormCheckboxControl, never both alongside a ControlValueAccessor.
How do I show server-side validation errors?
Return them from the submission action. An error with fieldTree: f.email attaches to that field; an error without it applies to the form. Return an array for several errors. They clear when the user edits the field.
Is there a schematic that converts Reactive Forms automatically?
Not that I could find. The official migration guide covers manual migration and the interop APIs.
Where this leaves your team
Signal Forms in Angular 22 is a stable, simpler model for forms with dynamic rules, and the interop story is good enough that no large team needs a risky rewrite. The plan that works is deliberately unexciting: upgrade the toolchain, convert design-system controls, build a shared schema library, write new forms with form(), migrate existing forms when you touch them, and use SignalFormControl or compatForm only as scaffolding with a removal date. Keep the server as the authority on validation, measure each step, and let stable Reactive Forms screens retire on their own schedule.
Need engineers who stay?
Dedicated developers at $3,500 per developer per month, working your backlog on 2-week sprints with a named technical lead.





