• Genel Bakış
@angular/forms/signals

FormRoot

directive
kararlıv22.0'den beri

A directive that binds a FieldTree to a <form> element.

API

    
      class FormRoot<T> {}
    
    

onSubmit

void
@parameventEvent
@returnsvoid

Description

A directive that binds a FieldTree to a <form> element.

It automatically:

  1. Sets novalidate on the form element to disable browser validation.
  2. Listens for the submit event, prevents the default behavior, and calls submit() on the FieldTree if it defines its own submission options.

Usage Notes

<form [formRoot]="myFieldTree">
  ...
</form>
Detaylara atla