npm install --save ngx-type-safe-reactive-form
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
) { }
}