This is the Angular wrapper for the De Re CRUD library.
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)">