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

DeReCRUD/angular

Repository files navigation

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