Open amitpatra opened 5 years ago
This is fixed for Canada
and 3 more countries via PRs https://github.com/appirio-tech/ng-iso-constants/pull/11 and https://github.com/appirio-tech/ng-iso-constants/pull/12.
The fixed version of the ng-iso-constants
has version 1.0.7
and NOT published to the npm
at the moment. But it can be used if in the package.json file instead of
"appirio-tech-ng-iso-constants": "^1.0.7",
we write
"appirio-tech-ng-iso-constants": "github:appirio-tech/ng-iso-constants#master",
Before marking this issue as fixed it could make sense to re-check all the types of codes for all the countries to make sure there are no other mismatches with standard https://www.iso.org/obp/ui/#search/code/.
We can also consider writing a script that would parse the website https://www.iso.org/obp/ui/#search/code/ and extract all the codes with country names in the format we need for ng-iso-constants
package. Such a parser should be more robust solution, than trying to verify and updated the codes manually.
cc @vikasrohit
Well I am not sure, but I guess few alpha2 codes are wrong .e.g https://github.com/appirio-tech/ng-iso-constants/blob/34f2fd28ac9a2f72b3da059f655c97493076af64/src/ng-iso-constants/services/iso-3166.js#L54 here the alpha2 code for Canada is 'CV' which is for Cape Verde(https://en.wikipedia.org/wiki/ISO_3166-2:CV) similarly, Cape Verde has the code for Cambodia and so on.