Skip to content

Latest commit

 

History

History
13 lines (6 loc) · 685 Bytes

README.md

File metadata and controls

13 lines (6 loc) · 685 Bytes

Angular Disabled Directive

You are working with Angular Reactive forms and need to disable / enable input fields. In such case Angular gives error saying

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.

This example focus on solving above problem using your own custom directive.

Reference link, Thanks!

Enjoy