Answers for "disable control with formbuilder"

1

how to set disabled flag formgroup angular

this.form.controls['name'].disable();

// or

<input formControlName="id" placeholder="ID" [attr.disabled]="true"></input>
Posted by: Guest on July-15-2020
0

disable control with formbuilder

this.userProfileForm = this.formBuilder.group({
  // ...
  password: [{
    value: null,
    disabled: !this.isResetPassword
  }],
  newPassword: [{
    value: null,
    disabled: !this.isResetPassword
  }],
  reTypePassword: [{
    value: null,
    disabled: !this.isResetPassword
  }]
});
Posted by: Guest on January-07-2021

Code answers related to "disable control with formbuilder"

Browse Popular Code Answers by Language