Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/forms/PACKAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ Angular forms allow you to:
- Validate the correctness of user input.
- Create custom validators and input elements.

You can build forms in one of two ways:
You can build forms in one of three ways:

- _Reactive forms_ use existing instances of a `FormControl` or `FormGroup` to build a form model. This form
model is synced with form input elements through directives to track and communicate changes back to the form model. Changes
to the value and status of the controls are provided as observables.
- _Template-driven forms_ rely on directives such as `NgModel` and `NgModelGroup` create the form model for you,
so any changes to the form are communicated through the template.
- _Signal forms_ use the `form()` function to build a form model from a signal that holds your data, with a
`schema()` that declares validation and other logic. This form model is synced with form input elements
through the `[formField]` directive. The value and status of the form are exposed as signals.

@see Find out more in the [Forms Overview](guide/forms).
34 changes: 4 additions & 30 deletions packages/forms/signals/PACKAGE.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,11 @@
# 🚧 Experimental Signal-Based Forms API 🏗️
# Signal-based forms API

This directory contains an experimental new Angular Forms API built on top of
[signals](https://angular.dev/guide/signals). We're using this experimental API to explore potential
designs for such a system, to play with new ideas, identify challenges, and to demonstrate
interoperability with the existing version of `@angular/forms`.
This directory contains the signal-based Angular forms API, built on top of
[signals](https://angular.dev/guide/signals). It is an alternative to template-driven and reactive
forms that keeps signals at its core, and interoperates with the existing `@angular/forms` APIs.

## Not yet supported

- Debouncing validation
- Dynamic objects
- Tuples
- Interop with Reactive/Template forms
- Strongly-typed binding to UI controls

## FAQs

### Why are you working on this?

We've been exploring ways that we can integrate signals into Angular's forms package. We've looked
at several options, including integrating signals into template and reactive forms, and designing a
new flavor of forms with signals at the core. Our hope is that we can leverage this work to close
the gap between template and reactive forms, which often inspires debate in the Angular ecosystem.

### What does this mean for the future of template and/or reactive forms?

Nothing is changing yet with template and reactive forms. This API is early and still highly experimental.

Even if we achieve our goals, we will roll out any changes to forms incrementally. Like with NgModules
and `standalone`, we don't intend to deprecate template or reactive forms without a clear sign from
our community that the ecosystem is fully on board.

### Will I need to rewrite my application code to use the new forms system?

No - a non-negotiable design goal of a new signal-based forms system is interoperability with
existing forms code and applications. It should be possible to incrementally start using the new
system in existing applications, and as always we will explore the possibility of automated migrations.
Loading