0.0.2 • Published 11 months ago

generic-form-library v0.0.2

Weekly downloads
-
License
-
Repository
-
Last release
11 months ago

GenericFormLibrary

This library provides a generic form component for Angular applications. It simplifies the process of creating forms by generating form fields based on a JSON configuration.

Installation

To install the library, you can use npm or yarn. Run the following command in your project directory:

npm install generic-form-library

or

yarn add generic-form-library

Usage

  1. Import the GenericFormPluginModule in your Angular module.

  2. Use the lib-generic-form-plugin component in your templates.

  3. Create a JSON object representing your form configuration. const jsonFormData = { fields: { type: 'text', label: 'Name', name: 'name', required: true }, { type: 'email', label: 'Email', name: 'email', required: true }, // Add more form fields as needed };

  4. Customize the form fields according to your requirements.

Example

Here's an example of how to use the library with a JSON form data:

import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  template: `
    <lib-generic-form-plugin [jsonFormData]="jsonFormData"></lib-generic-form-plugin>`
})
## License

MIT © [Eklictic Group]