angular 2 : TypeError: this.form.updateValueAndValidity is not a function angular 2 : TypeError: this.form.updateValueAndValidity is not a function angular angular

angular 2 : TypeError: this.form.updateValueAndValidity is not a function


I don't think that you can use at the same time the template-driven approach and the model-driven one.

So I would use either the following:

<form  *ngIf="showForm" #userForm="ngForm"   (ngSubmit)="userFormSubmit()"></form>

or:

<form  *ngIf="showForm" [formGroup]="userForm"   (ngSubmit)="userFormSubmit()"></form>

where userForm is defined in your component class with FormBuilder or FormControl. I think that this approach is what you need...