# angular2-form-schame
**Repository Path**: godbasin/angular2-form-schame
## Basic Information
- **Project Name**: angular2-form-schame
- **Description**: Generate forms from a JSON schema, with Angular(v2.0+)!
- **Primary Language**: TypeScript
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2019-11-25
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Angular2 Form Schame
Generate forms from JSON schemas using Angular(v2.0+)!
## Demo Time
[Here to experience.](http://p2n7500x0.bkt.clouddn.com/index.html)
## How to use
### About the project
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.5.0.
``` cmd
# clone code
git clone https://github.com/godbasin/angular2-form-schame.git
cd angular-custom-app
# npm install
npm install -g @angular/cli
npm install
```
# Documentation
## Component Types
### Form Components
**component demo**
``
**formConfig: config[]**
Config to generate form controls, arrays.
- `type`: Form Control Type
- 'text' | 'number' | 'select' |'select2'
- 'radio' | 'checkbox' | 'radio-with-input' | 'checkbox-with-input'
- 'day' | 'hour' | 'minute' | 'upload-image'
- see [Form Control Types](#form-control-types)
- `label`: control label
- `key`: model key
- `validations?` formbuilder validations
- `type`: validation type
- 'required' | 'email' | 'maxLength' | 'minLength' | 'pattern'
- `param?`: function call with param
- `message`: error message when not valid
- `options?`: options for select or radio or checkbox etc
- `id`: value
- `text`: text
- `withInput?`: if with input
- `type?`: input type
- "text" | "number" | "email"
- `limit?`: upload image limit
- `listConfig?`: config for `` control
**formModel**
Form value.
**Form Demo**

### Form Array Components
**component demo**
``
**arrayConfig**
Config to generate form lists.
- `functions`: List functions
- ['add', 'edit', 'delete']
- `formConfig`: formConfig, see ``
**arrayModel**
Array list value.
**Array Demo**

### Form List Components
**component demo**
``
**listConfig**
Config to generate form list tables.
- `functions`: List functions
- ['add', 'edit', 'delete']
- `formConfig`: formConfig, see ``
**listModel**
Array table value.
**List Demo**

## Form Control Types
**By now we support these form control types:**
- 'text': ``
- 'number': ``
- 'select': `