Install the library in your angular project
npm i @ngx-fast-forms/core
Add FastFormsModule.forRoot()
to your root module or add FastFormsModule.forChild()
to any child module.
Select one of the provided ui component libraries and also install it (or add your own form components):
@ngx-fast-forms/material
(addMaterialFastFormsModule
to your module imports)
Create your first form:
<aff-form-group [formGroup]="form"></aff-form-group>
export class ExampleComponent {
public form!: FastFormGroup;
constructor(private formService: FastFormsService) {
this.form = formService.createDynamicForm([{
id: 'first-input',
type: 'input', // depends on used ui component library or use the one registered by yourself
label: 'Example input'
}, {
id: 'second-input',
type: 'input',
label: 'Second input'
}]);
}
}
Start the app and you should see the created form