![]() set disabled attribute angular 8 directive. Upgrade your code with a variable ‘cond’ and if this is true you disable the form. ![]() 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. like suggested by JB Nizet the disabled expects only a boolean value (true or false). So in whatever method in your component you are calling you should disable the input like this: ('name'). With reactive forms you should never disable an input from the template. The issue is caused by package Is this a regression?Īdding only disabled AbstractControl to a FormGroup or a FormArray disables their parent. it looks like you're using the disabled attribute with a reactive form directive. The proper way to disable an form control. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |