mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
59ee51e2d4
After #68581 graduated the Signal Forms APIs to public API and #68654 removed
the experimental warnings from the Signal Forms documentation in adev, the
package READMEs still framed the API as experimental.
Update `packages/forms/signals/PACKAGE.md`: drop the experimental title and
intro, remove the now-shipped entries from "Not yet supported" (interop with
reactive/template forms and strongly-typed binding to UI controls), and remove
the remaining experimental and exploratory wording from the FAQ.
Update `packages/forms/PACKAGE.md`: it listed only two ways to build forms
(reactive and template-driven). Add signal forms as the third.
Fixes #68724
(cherry picked from commit 8b1726a1cf)
27 lines
1.6 KiB
Markdown
27 lines
1.6 KiB
Markdown
Implements a set of directives and providers to communicate with native DOM elements when building forms
|
|
to capture user input.
|
|
|
|
Use this API to register directives, build form and data models, and provide validation to your forms. Validators can
|
|
be synchronous or asynchronous depending on your use case. You can also extend the built-in functionality
|
|
provided by forms in Angular by using the interfaces and tokens to create custom validators and input elements.
|
|
|
|
Angular forms allow you to:
|
|
|
|
- Capture the current value and validation status of a form.
|
|
- Track and listen for changes to the form's data model.
|
|
- Validate the correctness of user input.
|
|
- Create custom validators and input elements.
|
|
|
|
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).
|