filmov
tv
Can't bind to 'FormGroup' since it isn't a known property of 'form'
Показать описание
i have created new project using
ng new angularTutorial command (typed in command prompt)
now run project using ng serve command & press enter & wait for run (√ Compiled
successfully.)
after check output on browser & type localhost:4200 on the URL & press enter
userForm : FormGroup;
ngOnInit()
{
username : new FormControl(),
email : new FormControl()
});
}
lets add formGroup property to form tag as
[formGroup]="userForm"
AND
formControlName property to input tag as
formControlName="username" for input username
formControlName="email" for input useremail
Can't bind to 'FormGroup' since it isn't a known property of 'form'.
and also add it in imports array
here is your issue solved
ng new angularTutorial command (typed in command prompt)
now run project using ng serve command & press enter & wait for run (√ Compiled
successfully.)
after check output on browser & type localhost:4200 on the URL & press enter
userForm : FormGroup;
ngOnInit()
{
username : new FormControl(),
email : new FormControl()
});
}
lets add formGroup property to form tag as
[formGroup]="userForm"
AND
formControlName property to input tag as
formControlName="username" for input username
formControlName="email" for input useremail
Can't bind to 'FormGroup' since it isn't a known property of 'form'.
and also add it in imports array
here is your issue solved