// FUNCTION TO RETRIEVE DEVICE LIST
fetchDeviceList(): Observable < DeviceList > {
this.setToken();
return this.http.get<DeviceList>(this.api_url + '/devices', this.httpOptions1)
.retry(2);
}
I am facing a challenge in this particular situation. I have defined the model and am attempting to retrieve the devicelist
. I have integrated the model into the api.service
file, but encountered the following error:
ERROR in src/app/services/api.service.ts(86,9): error TS2322: Type 'Observable<HttpEvent<DeviceList>>' is not assignable to type 'Observable<DeviceList>'. Type 'HttpEvent<DeviceList>' is not assignable to type 'DeviceList'. Type 'HttpProgressEvent' is not assignable to type 'DeviceList'. Property 'device_family' is missing in type 'HttpProgressEvent'.