• 개요
@angular/forms/signals

FormRoot

디렉티브
안정화v22.0부터

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

API

    
      class FormRoot<T> {}
    
    

onSubmit

void
@parameventEvent
@returnsvoid

설명

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.

사용 시 참고사항

<form [formRoot]="myFieldTree">
  ...
</form>
상세 내용으로 이동