add-dynamic-inputs
v0.0.6
Published
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0. It's used to add dynamic input fields in your application.
Downloads
3
Readme
Add Dynamic Inputs
This library was generated with Angular CLI version 12.2.0. It's used to add dynamic input fields in your application.
Installation & Usage
npm i add-dynamic-inputs
- Add below line in your Module ts file,
import { AddDynamicModule } from 'add-dynamic-inputs';
- Add imported module name inside @NgModule -> imports in same module ts file.
- Include below given line in your angular.json under projects -> app name -> architect -> options
"preserveSymlinks": true
- Add your code using
<add-dynamic-inputs/>
in your component like following example code.
Example
<add-dynamic-inputs field1="Name" field2="Email" addButtonType="+" removeButtonType="-"
(newItemEvent)="acceptData($event)">
</add-dynamic-inputs>
props
for the <add-dynamic-inputs/>
:
| Keys | Description | |:------------------------------|:----------------------------------------------------------------| | field1, field2, ... field10 | add label name upto 10 fields | | addButtonType | displays add button name for adding fields | | removeButtonType | displays remove button name for removing fields | | newItemEvent | output for added input fields given in array using this event |