• Overview
@angular/forms/signals

FormRoot

directive
stable

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.

Usage Notes

<form [formRoot]="myFieldTree">
  ...
</form>
Jump to details