Reputation: 31
I try to take first array of a sub array. So I have it like this:
Map: map;
Map() {
Service
});
}
and this is the interface:
export interface map {
}
But I get this error:
ERROR TypeError: Cannot set property 'heatmap' of undefined
so what I have to change?
I still get this error:
core.js:4442 ERROR TypeError: Cannot read property 'map' of null
.pipe(map((res) => res.map.slice(0, 1)))
and this is how I have it:
Map() {
});
}
yes,
so I have this now:
dMap() {
console.log(this.Map.map);
this.Service
});
}
But when I hover the mouse over this line:
console.log(this.Map.heatmap);
Upvotes: 0
Views: 160
Reputation: 10979
change
cameraAgretateHeadMap: CameraAggregationHeatmap;
to
cameraAgretateHeadMap: CameraAggregationHeatmap = {};
Upvotes: 4