Hello everyone I'm new to angular so I'm having a hard time with some very common things in angular. I'm using a reactive form where I'm using some select tags everything is going smooth except when I'm trying to pre-select an option from a select tag with the data coming from the rest call, the select tag is not setting up. To make everything clear I'm using the formGroup patchValue to fill all the controls with values.
this.contactForm.patchValue(this.contractOwner);
bellow how my select tag looks like
<select formControlName="contractCategory" class="form-control">
<option [ngValue]="null" selected>Please choose</option>
<option *ngFor="let category of contactCategoryList" [ngValue]="category">
{{ category.description }}
</option>
</select>
below is the selected value object from the rest call is coming
contractCategory: {id: 2, code: "C2", description: "Category 2", organizationId: 0, isActive: 1,…}