0

I'm working on a project where I have to deal with lots of forms in Angular. When I disable the submit button, I get this warning message on the console:

 It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true
      when you set up this control in your component class, the disabled attribute will actually be set in the DOM for
      you. We recommend using this approach to avoid 'changed after checked' errors.

      Example: 
      form = new FormGroup({
        first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),
        last: new FormControl('Drew', Validators.required)
      });
CodeCodeCodon
  • 385
  • 1
  • 4
  • 14

0 Answers0