Skip to content
Type-safe Reactive Forms for Angular
TypeScript JavaScript Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
projects/ngx-type-safe-reactive-form
scripts
.editorconfig
.gitignore
.releaserc.json
.travis.yml
CHANGELOG.md
LICENSE
README.md
angular.json
package-lock.json
package.json
tsconfig.json
tslint.json

README.md

Build Status npm version License: MIT

NgxTypeSafeReactiveForm

Installation

npm install --save ngx-type-safe-reactive-form

Usage

Same as the original Reactive Forms, but it has a type.
See https://angular.io/guide/reactive-forms

import { TypeSafeFormBuilder } from 'ngx-type-safe-reactive-form';

@Component({
  selector: 'app-form',
  templateUrl: './form.component.html',
})
export class FormComponent {

  readonly form = this.formBuilder.group({
    username: '',
    password: '',
    rememberMe: false,
  });

  constructor(
    private formBuilder: TypeSafeFormBuilder
  ) { }

}

Live example

You can’t perform that action at this time.