2

assume that I create FormGroup like this

    this.orderProductForm = this.formBuilder.group({
        productList: []
    });

    this.addressForm = this.formBuilder.group({
        shippingName: '',
        shippingAddress: '',
        shippingMobile: '',
    });

and after that I called...

  this.orderProductForm.enable();
  this.addressForm.enable();

or

  this.orderProductForm.disable();
  this.addressForm.disable();

It's not working, please help..

3
  • Where and when are you calling these enable and disable? Commented Jul 16, 2017 at 8:56
  • what do you mean not working? Commented Jul 16, 2017 at 9:55
  • 1
    in my case, it is not reflecting in the browser. Commented Nov 13, 2018 at 14:44

1 Answer 1

1

Disabling a formControl in Angular means that the value is not showing up in the form's value() or getRawValue(), and the changes to it are not tracked. It does not disable the HTML elements attached to the formControl.

You can disable the HTML element by setting its disabled attribute.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.