Initializing formGroup in ngOnInit() not a bad practice, as it will be really necessary if you want your form to be initialized with values โโthat depend (directly or indirectly) on your @Input() s component.
For instance:
class SignInFormComponent { @Input() currentLogin: string; formGroup: FormGroup; constructor() {
source share