我在Angular 2+应用中使用了反应形式。我需要动态启用/禁用表单中的一个字段。
禁用我使用此代码:
this.cardForm.get('cvc').disable();
效果很好。但我不知道如何启用。 我正在尝试:
属性' removeAttribute'在类型' AbstractControl'上不存在
无法调用类型缺少调用签名的表达式。输入'布尔'没有兼容的呼叫签名。
答案 0 :(得分:0)
this.cardForm.get('cvc').enable()