I just wondering what is the difference between initializing formGroup inside the class or inside the constructor.
Creating them when we are declaring them like this:
form: FormGroup = this.formBuilder.group({})Declare its variable and then create them in
constructorofclassform: FormGroup; constructor(private formBuilder: FormBuilder) { this.form = this.formBuilder.group({}) }
Are there any differences between these two approaches and what are the pros and cons of these two approaches?