
Scenario
We have a reactive Angular form and we want to disable it programmatically.
Approach
this.form.disable();Demo
We disable the login form in the ngOnInit block. It’s not possible to enter anything in the form fields and the styling has change to indicate that the form is disabled ( Note that the submit button is not disabled ) :
