This Angular Code doesn't let me display array . The error in console displays "Error trying to diff '[object Object]'" My component.ts :
sprints : Sprint[] = [];
ngOnInit() : void {
this.sprintService.getSprints().subscribe(
data =>
{
console.log(data);
this.sprints = data as any;
}
);
}
```
this is html code :
```
<div *ngFor="let sprint of sprints">
{{sprint.codeSprint}}
{{sprint.title}}
</div>
```
I got this error :
ERROR Error: Error trying to diff '[object Object]'. Only arrays and iterables are allowed at DefaultIterableDiffer.diff (core.js:26690)
When i logged I got the array but it deosn't diplay in html page
Thanks in advance !
data as any? Why theany? - Silverminddatato yoursprintarray? What's the purpose of usingdata as any? - Kirubeldatais not an array, butdata.objetis. Do you understand what to do now? - Silvermind