0
にJSONレスポンスを表示することはできません私は、JSONレスポンスを表示しようとしているが、何も表示するように見えることはできません。イオン2:ビュー
応答:
woo.service。 TS:
getProducts() : Observable<any> {
let headers = new Headers();
headers.append('Content-Type', 'application/x-www-form-urlencoded');
return this._http.get(this._url+'products?'+'consumer_key='+this._ck+'&consumer_secret='+this._cs, {
headers : headers
}).map(res => res.json().items);
}
woo.ts:
ngOnInit() {
this._wooService.getProducts()
.subscribe(
response => this.response = response,
error => console.log(error));
this.isLoading = false;
}
そして最後にwoo.html:
<ion-card-header class="cardHead" text-center>
<h2 class="cardHeaderText">{{obj.products.title}}</h2>
<p>Prix: {{obj.price_html}}</p>
</ion-card-header>
<ion-card-content>
<img src="{{obj.images.src}}">
<p class="cardBodyText">{{obj.description}}</p>
<p>Tags: {{obj.tags}}</p>
<p>Catégories: {{obj.categories}}</p>
</ion-card-content>
誰もが、私は* ngFor = "応答の#のOBJ" にアクセスすることはできませんなぜアイデアを持っていますか?