Api returns nested objects, I want to enter a nested array here and get all patato-child .
I also did all the actions, effects, gears.
Json view:
{
"id":13,
"patato":Patato
"patato-child":[
{
"id":12,
"name":"Adventure"
},
{
"id":18,
"name":"Drama"
}
],
"url":"randomUrl.jpg",
"example":"Example"
}
Type of model:
export interface Patato {
id: number;
patato: string;
url: string;
example: string;
patato-child: PatatoChild[];
}
export interface PatatoChild {
id: number;
name: string;
}
Componentent.ts
get patato-child() {
return this.patato.patatoChild;
}
HTML view:
[object Object, object Object]
What is wrong with this structure, I cannot get any patato-child with ngFor to list the whole child patato
I am using Angular 2+ Redux + @ngrx
source
share