We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I'm trying to set the default country as such. But the field stays empty: component.ts
this.currentCountry = {alpha2Code:'DE', alpha3Code:null, callingCode:null, name:null, numericCode:null};
component.html
<mat-select-country appearance="outline" label="Country" formControlName="country" [value]="currentCountry" (onCountrySelected)="onCountrySelected($event)"> </mat-select-country>
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"
The text was updated successfully, but these errors were encountered:
I faced the same issue, please update any fix soon @AnthonyNahas ?
Sorry, something went wrong.
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], ... });
AnthonyNahas
No branches or pull requests
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"
The text was updated successfully, but these errors were encountered: