I'm trying to display the incorrect answers made by the user on a specific quiz. But it does not display the data in my HTML. What am I doing wrong in here?
on my html:
<ion-slide *ngFor="let incorrect of wrongAnswers;let i=index">
<ion-label>{{i+1}}</ion-label>
<h5>{{incorrect.questionA}}</h5>
<h5>{{incorrect.choice}}</h5>
<h5>{{incorrect.answer}}</h5>
<button ion-button (click)="error()"></button>
</ion-slide>
on my typescript:
wrongAnswers: any[] = [];
if (answer.correct == false) {
this.wrongAnswers.push([{
questionA: question.questionText,
choice: answer.selected,
answer: answer.answer
}]);
}
On my console this is what is being displayed:

[]that surround the objects you're pushing, i.e..push({ ... });.