Link to home
Start Free TrialLog in
Avatar of Karthey Sundarem
Karthey Sundarem

asked on

angular 2 abstract form which has control enable

Hi, I am using an angular 2 abstract form which has child component. For some reason the child inputs get disabled. I am trying to keep it enabled all the time. I tried as given in Angular Abstract control instruction

abstract patchPaymentMethodForm(paymentMethod: PaymentMethod): void;
// NOT working

this.paymentMethodForm.controls['card-number'].disable({ emitEvent: false });
Avatar of Karthey Sundarem
Karthey Sundarem

ASKER

Any help is really appreciated.
Thanks
Avatar of Julian Hansen
Can you show us more of the code
Hi,

Please find the attached code.  I have separated the files using " *******"
Thanks
Karthey
No files
Hi ,

First time when the form loads its working okay.  When I try to use the second time, the form input card-number gets disabled.

I am not able to enable it.

Thanks for the help Julian!
-Karthey
AbstractFormControlIssue.txt
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.