1

I am seeing the below error all the time:

formGroup expects a FormGroup instance. Please pass one in.

In HTML:

<mat-step [stepControl]="firstFormGroup">
<form [formGroup]="firstFormGroup">

I have this in my .ts file:

firstFormGroup!: FormGroup;
0

1 Answer 1

1

you need to initialize the value for the form group. In your component code add this

  constructor(private _formBuilder: FormBuilder) {}

  ngOnInit() {
    this.firstFormGroup = this._formBuilder.group({
     // add your form controls here 
    });
  }
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.