I have followed the instructions in the guide but I am encountering issues.
An error message stating the following is being displayed:
Can't bind to 'formGroup' since it isn't a known property of 'form'.
Another error occurs when I remove the [(ngModel)] from the items:
[ERROR ->] <ion-input type="text" formControlName="nome" name="nome" required></ion-input>
</ion-item>
"): ng:///HomePageModule/HomePage.html@59:10
No provider for NgControl ("
<ion-item>
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
imports: [
BrowserModule,
IonicModule.forRoot(),
AppRoutingModule,
FormsModule,
ReactiveFormsModule
],
import { FormsModule, ReactiveFormsModule, Validators, FormBuilder, FormGroup, FormControl } from '@angular/forms';
inscricaoForm;
constructor(formBuilder: FormBuilder, inscricaoForm: FormGroup) {
this.inscricaoForm = formBuilder.group({
dataInscricao: ['', Validators.required],
nome: ['', Validators.required],
endereco: ['', Validators.required]
});
}
<form [formGroup]="inscricaoForm">