@sfamose/angular-components
v0.0.65
Published
a library of angular components
Downloads
215
Readme
AngularComponents
Table of contents
Getting started
Install angular-components through npm:
npm install --save @sfamose/angular-components
peer dependencies :
- @angular/cdk (>=10.0.1)
- @angular/material (>=10.0.1)
- @angular/material-moment-adapter (>=10.0.1)
- moment (>=2.24.0")
AcDynamicFormModule
Import the acDynamicFormModule module into your app's module:
import {BrowserModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {NgModule} from '@angular/core';
import {AppComponent} from './app.component';
import {AcDynamicFormModule} from '@sfamose/angular-components';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
BrowserAnimationsModule,
AcDynamicFormModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Next, add the form configuration in the component
config: AcDynamicForm = {
fields: [
{
name: 'test',
type: 'input',
label: 'Test'
}
]
}
Then, add the dynamic form in the template
<ac-dynamic-form [config]="config"></ac-dynamic-form>