• Overview
@angular/forms/signals

FormRoot

directive
stable

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

API

    
      class FormRoot<T> {  readonly @Input('formRoot') fieldTree: InputSignal<FieldTree<T>>;  protected onSubmit(event: Event): void;}
    
    

fieldTree

InputSignal<FieldTree<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