wninputcontrol
v0.0.2
Published
Simple service for your formgroup and formcontrol.
Downloads
24
Maintainers
Readme
Wninputcontrol
Simple service for your formgroup and formcontrol.
Table of Contents
Installation
$ npm i wninputcontrol
Usage
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
Available Functions
Every function takes the same parameters.
1. clearValidatorControl
Functions to clear all validators in formControl.
2. resetControl
Functions to reset value in formControl.
3. enableControl
Functions to enable the formControl.
4. disableControl
Functions to disable the formControl.