How to return code for country on angular 7 ?
I work on angular 7 app I face Issue I cannot display country code for country meaning
I already return country on ZCO as India , egypt,unitedstates and it working
but I cannot display code for country as IN,eg,us
ts compoent
- this.OriginCountry= this.partDetailsService.currentData.OriginCountry;
- this.OriginCountry.forEach(e => {
- e.code=getCode(e.ZCO);
-
- });
-
- console.log("country origion" + JSON.stringify(this.OriginCountry) )
html component
- <div *ngFor="let country of OriginCountry" >
- {{country.ZCO}}
- <img class="mr-05" src="http://part.z2data.com/assets/img/flags/{{country.code}}.png">
-
- </div>
only I need to get code for country
I already have country and represented by ZCO
but code as us,in cannot return
are there are any package or function do that on angular 7
please help me
ZCO represent country as egypt, Unitedstates,India