@de-re-crud/angular
TypeScript icon, indicating that this package has built-in type declarations

0.20.2 • Public • Published

@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)">

Readme

Keywords

none

Package Sidebar

Install

npm i @de-re-crud/angular

Weekly Downloads

3

Version

0.20.2

License

Apache-2.0

Unpacked Size

257 kB

Total Files

42

Last publish

Collaborators

  • gregbty
  • jpamp