@de-re-crud/angular

Angular wrapper for De Re CRUD

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
@de-re-crud/angular
Minified + gzip package size for @de-re-crud/angular in KB

Readme

@de-re-crud/angular

Angular wrapper for the De Re CRUD library.

Usage

Install preact, core, and UI libraries:

yarn add preact@next  #or npm install --save preact@next
yarn add @de-re-crud/core #or npm install --save @de-re-crud/core 
yarn add @de-re-crud/ui #or npm install --save @de-re-crud/ui 

Install Angular CDK:

yarn add @angular/cdk  #or npm install --save @angular/cdk

Install the library:

yarn add @de-re-crud/angular #or, npm install --save @de-re-crud/angular

Install a theme:

# You will need to include Bootstrap 4 CSS.
yarn add @de-re-crud/theme-bootstrap4 #or npm install --save @de-re-crud/theme-bootstrap4

Import and register the DeReCrudModule:

import { DeCrudModule } from '@de-re-crud/angular';

@NgModule({
    /*...*/
    imports: [/*..*/, DeReCrudModule]
})
export class AppModule {}

The use it in a component:

app.component.ts

import { Bootstrap4RendererOptions } from '@de-re-crud/theme-bootstrap4';
import schemaJson from './schema.json';  // Your defined De Re CRUD schema

@Component({ /*...*/ })
export class AppComponent {
  rendererOptions = Bootstrap4RendererOptions;
  schema = schemaJson;
  struct= "struct"

  onSubmit() {
      // Handle submission
  }
}

app.component.html

<drc-form [rendererOptions]="rendererOptions" [schema]="schemaJson" struct="struct" submitForm="onSubmit($event)">

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.