Reputation: 4599
I have angular 4 form which is generated dynamically using the configuration(JSON) file. And i want to set the value for input field while choosing the selectbox option.
I have created the sample code in stackblitz
.
https://stackblitz.com/edit/angular-dnhcd1?file=src/app/dynamic-form-component.ts
Upvotes: 0
Views: 2111
Reputation: 4599
I have found a solution to set the value.
this.issuerConfigForm.controls['iinprefix'].patchValue("20");
Upvotes: 1