wninputcontrol
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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.

Package Sidebar

Install

npm i wninputcontrol

Weekly Downloads

1

Version

0.0.2

License

none

Unpacked Size

23.4 kB

Total Files

14

Last publish

Collaborators

  • winniezero