ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(RegisterPageModule)[FormBuilder -> FormBuilder -> FormBuilder -> FormBuilder]:
NullInjectorError: No provider for FormBuilder!
[SOLVED]
[참조] can’t bind to ‘formgroup’ since it isn’t a known property of ‘form’
formGroup을 사용하는 컴포넌트 및 페이지 단의 module.ts에
ReactiveFormsModule
을 추가하지 않아서 생긴 오류였음
ReactiveFormsModule
을 추가해주고도ERROR Error: Uncaught (in promise): Error: formControlName must be used with a parent formGroup directive. You'll want to add a formGroup directive and pass it an existing FormGroup instance (you can create one in your class).
이런 문구가 뜬다면 ,
- html단에서 form 태그가 여러번 사용되고 있는지
- [formGroup]은 formControllerName을 사용하는 div의 상위에 있는지
이 두가지를 확인해 볼 필요가 있음