Open morrowyn opened 3 years ago
I faced the same issue, please update any fix soon @AnthonyNahas ?
I suggest to make the value field require only 1 value from Country Model, which is for example alpha2Code or numericCode
For anyone who has a difficult time in setting the default country in reactive forms, setting only alpha2Code should work:
this.identityCardFormGroup = this._formBuilder.group({
taraEmiterii: [{ alpha2Code: 'RO' }, Validators.required],
...
});
Hi,
I'm trying to set the default country as such. But the field stays empty: component.ts
component.html
output:
The documentation specified I should: pass an empty Country object with alpha2 code populated to do alpha2 lookup)
Any idea what is wrong with my code?
Btw. Im using the following versions: angular 12 @angular-material-extensions/select-country": "^5.0.1" "svg-country-flags": "^1.2.10"