angular/packages
Miles Malerba b8314bd340 feat(forms): add experimental signal-based forms (#63408)
This commit introduces an experimental version of a new signal-based forms API for Angular. This new API aims to explore how signals can be leveraged to create a more declarative, intuitive, and reactive way of handling forms.

The primary goals of this new signal-based approach are:

*   **Signal-centric Design:** Place signals at the core of the forms experience, enabling a truly reactive programming model for form state and logic.
*   **Declarative Logic:** Allow developers to define form behavior, such as validation and conditional fields, declaratively using TypeScript. This moves logic out of the template and into a typed, testable schema.
*   **Developer-Owned Data Model:** The library does not maintain a copy of data in a form model, but instead read and write it via a developer-provided `WritableSignal`, eliminating the need for applications to synchronize their data with the form system.
*   **Interoperability:** A key design goal is seamless interoperability with existing reactive forms, allowing for incremental adoption.
*   **Bridging Template and Reactive Forms:** This exploration hopes to close the gap between template and reactive forms, offering a unified and more powerful approach that combines the best aspects of both.

This initial version of the experimental API includes the core building blocks, such as the `form()` function, `Field` and `FieldState` objects, and a `[control]` directive for binding to UI elements. It also introduces a schema-based system for defining validation, conditional logic, and other form behaviors.

Note: This is an early, experimental API. It is not yet complete and is subject to change based on feedback and further exploration.

Co-authored-by: Kirill Cherkashin <kirts@google.com>
Co-authored-by: Alex Rickabaugh <alxhub@users.noreply.github.com>
Co-authored-by: Leon Senft <leonsenft@users.noreply.github.com>
Co-authored-by: Dylan Hunn <dylhunn@gmail.com>
Co-authored-by: Michael Small <michael-small@users.noreply.github.com>

PR Close #63408
2025-08-28 09:02:43 -07:00
..
animations build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
benchpress build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
common feat(http): Add reponseType property to HttpResponse and HttpErrorResponse (#63043) 2025-08-28 08:34:56 -07:00
compiler fix(compiler): fixes animations on elements with structural directives (#63390) 2025-08-26 09:47:07 -07:00
compiler-cli fix(compiler): fixes animations on elements with structural directives (#63390) 2025-08-26 09:47:07 -07:00
core fix(core): Prevent an error on cleanup when an rxResource stream threw before returning an Observable (#63342) 2025-08-28 08:44:51 -07:00
docs/di
elements build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
examples build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
forms feat(forms): add experimental signal-based forms (#63408) 2025-08-28 09:02:43 -07:00
language-service build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
localize build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
misc/angular-in-memory-web-api build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
platform-browser build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
platform-browser-dynamic build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
platform-server build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
private/testing build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
router build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
service-worker build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
ssr/docs build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
upgrade fix(upgrade): Remove deprecated UpgradeAdapter (#61659) 2025-08-27 11:11:29 -07:00
zone.js build: move macros/build set up for zone.js into zone.js directories (#63421) 2025-08-27 11:23:57 -07:00
BUILD.bazel build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
circular-deps-test.conf.js docs(docs-infra): lift circular imports (#63186) 2025-08-19 07:58:45 +00:00
empty.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
goog.d.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
license-banner.txt docs: update license year (#59883) 2025-03-04 19:36:47 +00:00
package.json build: prepare for compiler-cli to be using ts_project (#61181) 2025-05-09 15:59:46 +00:00
README.md docs: fix links to docs (#57391) 2024-08-19 09:20:15 -07:00
system.d.ts refactor: update packages/core:{core,src} to ts_project (#61275) 2025-05-14 12:01:51 +00:00
tsconfig-build.json build: migrate to using new jasmine_test (#62131) 2025-06-19 10:06:27 +02:00
tsconfig-legacy-saucelabs.json feat(core): support TypeScript 5.5 (#56096) 2024-05-29 15:33:33 +02:00
tsconfig-test.json
tsconfig.json refactor: use zone.js from npm instead of packages/zone.js throughout repo (#61977) 2025-06-10 12:02:03 -07:00
tsec-exemption.json
types.d.ts build: move private testing helpers outside platform-browser/testing (#61472) 2025-05-20 10:00:43 +00:00

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

Usage information and reference details can be found in Angular documentation.

License: MIT