Vorlage kann nicht lesen * ngFor = "lass Git von user.ball" was Problem ??? wie bekommen Array Ball von Json ?? Ich bin traing aber seine Werke nichtRead .json in Vorlage Ionic 2 und Angular 2
meine Vorlage
<div *ngSwitchCase="'userpage'">
<ion-card>
<ion-card-content>``
<ion-list no-lines>
<ion-item *ngFor="let profile of users">
<ion-avatar item-left>
<img [src]="profile.img">
</ion-avatar>
<h2>{{profile.name}}</h2>
<p>{{profile.about}}</p>
</ion-item>
</ion-list>
</ion-card-content>
</ion-card>
</div>
<!-- Баллы и Достижения -->
<div *ngSwitchCase="'info2'">
<ion-card>
<ion-card-content>
<ion-item *ngFor="let git of user.ball">
<ion-icon name='planet' item-left></ion-icon>
{{git.name}}
<ion-note item-right>
{{git.score}}
</ion-note>
</ion-item>
</ion-card-content>
</ion-card>
</div>
</div>
.json Das ist mein Api Benutzer von hier i Ball Array nehmen, aber ionische kippe lesen oder ich habe Fehler nicht ich Hilfe pleace wissen !!!
[
{
"id": 1,
"name": "It Developer",
"img": "/assets/img/1_kanal.png",
"email": "[email protected]",
"surname": "IT app",
"balls": "400",
"ball": [
{
"id": 1,
"name": "Активность",
"score": "100"
},
{
"id": 2,
"name": "Добавления Комментарии",
"score": "150"
},{
"id": 3,
"name": "Репост в Соц Сеть",
"score": "200"
},
{
"id": 4,
"name": "Лайк",
"score": "50"
}
]
}
]
ist es 'user.ball' oder' users.ball' ? – micronyks
ich update siehe wieder –
Ich bin immer noch verwirrt mit meinem ersten Kommentar. – micronyks