0.1.2 • Published 4 years ago

@tommy4st/redyform v0.1.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 years ago

Redyform

Presentation agnostic, dynamic forms framework for Angular

npm install @tommy4st/redyform

Prerequisite

This library is just a framework for model-driven forms. There are no actually implemented form elements in it. You have to implement them yourself using your UI framework of choice.

There is a special kind of fields, which name ends in "array". They are always treated as a collection type.

Please see redyform-example for some help and a some basic field definitions.

How to use

TS:

jsonModel: RedyformModel = [
  {
    type: 'string',
    name: 'name',
    label: 'Your Name'
  },
  {
    type: 'array',
    name: 'comments',
    children: [
      {
        type: 'textarea',
        name: 'comment',
        label: 'Yout Comment'
      }
    ]
  }
];

data: any;

HTML:

<redyform [model]="jsonModel" [(ngModel)]="data"></redyform>

Build

Run ng build redyform to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

0.1.2

4 years ago

0.1.1

4 years ago

0.0.16

4 years ago

0.0.15

4 years ago