I’m creating form dynamic form control using this code
this.fieldsData.forEach((ele, i) => {
if(ele?.inputType=='dropdown')
{
const splitValues =ele?.inputValues.split(',');
ele.DisplayName= ele?.labelName.replace(/###/g,' ');
form[ele?.labelName]=new FormControl('',ele?.mandatory=='yes' ? Validators.required : []);
}
});
in html
component i have this code
<form [formGroup]="FormGroup" *ngIf="fieldsData?.length>0">
<ng-container *ngIf="data.inputType=='dropdown'">
<select name="select-state" class="form-control"formControlName="{{data.labelName}}">
<option value="">Select</option>
</select>
</ng-container>
</form>
i want to pass value also which is there in splitValues
variable.
Any solution Thanks