Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.

Latest commit

 

History

History
48 lines (33 loc) · 1.24 KB

File metadata and controls

48 lines (33 loc) · 1.24 KB

De Re CRUD (Angular)

GitHub license CircleCI Status

This is the Angular wrapper for the De Re CRUD library.

Getting Started

Follow the steps listed in the De Re CRUD library.

Install library:

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

Import and register DeReCrudModule:

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

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

Use the component selector:

Component

import { Bootstrap3RendererOptions } from "@de-re-crud/renderer-bootstrap3";
import schemaJson from "./schema.json";

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

Template

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