-1

I am trying to make a Angular Reactive Form ReadOnly, so it cannot be edited. Currently seeing two methods below. What is the difference between the two strategies mentioned?

Option 1:

<form [formGroup]="testForm">
    <fieldset [disabled]="true">
        ...
    </fieldset>

Option 2

this.testform.disable();

Resource:

Disable the entire form at once (Angular reactive form)

1 Answers1

0

Effectively no difference.

The first one can be used in template driven forms as well while later is obviously part of reactive forms.

Antoniossss
  • 24,977
  • 3
  • 43
  • 86