Can you tell me what am I doing wrong ?
this.scheduleService.GetZones(environment.systemId)
.pipe(
mergeMap((zone: Zone) => {
return this.dashboardService.GetLatestMeasurementValue(environment.systemId, zone.sensorId)
})
.subscribe(mois => {
this.currentMoisture = mois;
})
);
}
I get this error: Property 'subscribe' does not exist on type 'OperatorFunction'
You cannot subscribe to an operator. You need to subscribe as follows.
this.scheduleService.GetZones(environment.systemId)
.pipe(
mergeMap((zone: Zone) => {
return this.dashboardService.GetLatestMeasurementValue(environment.systemId, zone.sensorId);
})
)
.subscribe(mois => {
this.currentMoisture = mois;
})