Simple service for your formgroup and formcontrol.
$ npm i wninputcontrol
To use WninputcontrolService in your Angular project, import the WninputcontrolService into your component.ts and add it to your function. For example, to use the disable
function:
import { WninputcontrolService } from 'wninputcontrol';
// ...
constructor(private fb: FormBuilder, private ws: WninputcontrolService)
// ...
this.ws.disableControl(arg1, arg2, arg3)
// ...
arg1
Your formgroup which you want to access formContol
arg2
List of formControl's name that you want to disable
arg3
List of formControl's name that you don't want to disable
Every function takes the same parameters.
Functions to clear all validators in formControl.
Functions to reset value in formControl.
Functions to enable the formControl.
Functions to disable the formControl.