I am not able to show using ngFor in front end
of this value
{"orderId":"5919930bbd9d5b6093b855ca","_id":"591ade3b07739320890249b5","GrandTotalAmount":26375,"productDetails":[{"productCatalogId":"58ff187cd753ba37ed752308","productName":"samrat","productModel":"smc","productVersion":"1.0","productLangauge":"English","productMrp":5275,"productDiscountPercent":0,"productDiscount":0,"productSalePrice":5275,"productQuantity":5,"productTotalAmount":26375,"_id":"591ade3b07739320890249b6"}]}
this is my service.ts code
getmycart(orderid){
var headers = new Headers();
headers.append('X-access-token',`${this.auth.getToken()}`);
return new Promise((resolve) => {
this.http.get(`${Contants.API_CARTPRODUCT+orderid}`,{headers:headers}).map(res=>res.json()).subscribe((data) => {
this.result = data;
resolve(this.result);
})
})
}
this is my .ts code
loadMycart(){
let listnow = this.authuser.getmycart(this.orderId);
console.log(listnow);
listnow.then(data => {
this.result=data;
console.log(this.result);
})
}
this is my .html code
<ion-content padding>
<div *ngFor="let j of result.productDetails">
{{j.productName}}
{{j.productName}}
{{j.productVersion}}
{{j.productLangauge}}
</div>
</ion-content>