I am currently trying to display the value of a property in my template, but nothing is appearing. Here is my component code:
export class ServerStatusComponent implements OnInit {
snovieCollection: SnovietatusDto = {};
constructor(private snovierStatus: snovieStatusService) {}
ngOnInit(): void {
this.sensorStatus
.getSensorStatuses()
.pipe(
map((data) => {
console.log(data.cameraSensors);
})
)
.subscribe((status) => {
});
}
}
This is how my template looks:
<p>Camera sensors</p>
<tr *ngFor="let camera of snovieStatusCollection.key|keyvalue">
test
<h3> {{camera | json}}</h3>
</tr>
I am simply trying to display the value of the key in the template. The console log shows this:
0: {key: "T", latestTimestamp: "2021-03-12T10:09:00Z"}
No errors are being shown, but the value is not displaying either.