@tommy4st/redyform
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.20latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.20
0.1.10

Package Sidebar

Install

npm i @tommy4st/redyform

Weekly Downloads

0

Version

0.1.2

License

Apache-2.0

Unpacked Size

314 kB

Total Files

30

Last publish

Collaborators

  • tommy4st