Angular Fast Froms
  • Angular Fast Forms
  • Introduction
    • Concepts
    • Getting started
  • Components
    • Form Control
    • Form Group
  • Validation
    • Sync Validator
    • Async Validator
  • Advanced
    • Injection
    • NGXS Support
    • JSON
Powered by GitBook
On this page
  • General
  • UI Libraries
Edit on GitHub
  1. Introduction

Getting started

PreviousConceptsNextComponents

Last updated 2 years ago

General

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.

UI Libraries

Select one of the provided ui component libraries and also install it ():

  • @ngx-fast-forms/material (add MaterialFastFormsModule 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

or add your own form components
Github simple example